diff options
| author | 2023-03-06 13:28:15 +0100 | |
|---|---|---|
| committer | 2023-03-06 13:28:15 +0100 | |
| commit | 1152450d1c1f742a20d6db2d3fce3169ff80a8a1 (patch) | |
| tree | 0f5f764130c63edd4f0f16a2815787ada654e1f2 /format.c | |
| parent | msg_update() sends copies the 'to' and 'cc' fields in notes. (diff) | |
| download | penes-snac2-1152450d1c1f742a20d6db2d3fce3169ff80a8a1.tar.gz penes-snac2-1152450d1c1f742a20d6db2d3fce3169ff80a8a1.tar.xz penes-snac2-1152450d1c1f742a20d6db2d3fce3169ff80a8a1.zip | |
Changed the way invalid codes in strings are stripped.
Diffstat (limited to 'format.c')
| -rw-r--r-- | format.c | 3 |
1 files changed, 1 insertions, 2 deletions
| @@ -183,8 +183,7 @@ d_char *sanitize(const char *content) | |||
| 183 | 183 | ||
| 184 | /* strip dangerous control codes */ | 184 | /* strip dangerous control codes */ |
| 185 | for (n = 0; content2[n]; n++) { | 185 | for (n = 0; content2[n]; n++) { |
| 186 | if (content2[n] > 0x0 && content2[n] < 0x20 && | 186 | if (xs_type(&content2[n]) != XSTYPE_STRING) |
| 187 | content2[n] != '\r' && content2[n] != '\n') | ||
| 188 | content2[n] = ' '; | 187 | content2[n] = ' '; |
| 189 | } | 188 | } |
| 190 | 189 | ||