commit 1152450
default
·
2023-03-06 12:28:15 +0000 UTC
parent 60f77b6
Changed the way invalid codes in strings are stripped.
1 files changed,
+1,
-2
M
format.c
M
format.c
+1,
-2
1@@ -183,8 +183,7 @@ d_char *sanitize(const char *content)
2
3 /* strip dangerous control codes */
4 for (n = 0; content2[n]; n++) {
5- if (content2[n] > 0x0 && content2[n] < 0x20 &&
6- content2[n] != '\r' && content2[n] != '\n')
7+ if (xs_type(&content2[n]) != XSTYPE_STRING)
8 content2[n] = ' ';
9 }
10