Prevent control characters from corrupting SVG

Bug fix by Maikel Houthuijzen
This commit is contained in:
Robin Stuart 2017-05-11 20:15:10 +01:00
parent 1ec0873caa
commit eef59d150e

View File

@ -206,6 +206,13 @@ int svg_plot(struct zint_symbol *symbol) {
}
addon[r] = '\0';
/* Don't include control characters in output text */
for(i = 0; i < ustrlen(local_text); i++) {
if (local_text[i] < ' ') {
local_text[i] = ' ';
}
}
if (ustrlen(local_text) != 0) {
textoffset = 9;
} else {