Escape the body of the patch with %xx notation.
| 136 | + QString(" @@\n"); |
| 137 | // Escape the body of the patch with %xx notation. |
| 138 | foreach (Diff aDiff, diffs) { |
| 139 | switch (aDiff.operation) { |
| 140 | case INSERT: |
| 141 | text += QString('+'); |
| 142 | break; |
| 143 | case DELETE: |
| 144 | text += QString('-'); |
| 145 | break; |
| 146 | case EQUAL: |
| 147 | text += QString(' '); |
| 148 | break; |
| 149 | } |
| 150 | text += QString(QUrl::toPercentEncoding(aDiff.text, " !~*'();/?:@&=+$,#")) |
| 151 | + QString("\n"); |
| 152 | } |
| 153 | |
| 154 | return text; |
| 155 | } |
nothing calls this directly
no test coverage detected