mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-23 11:36:54 -04:00
Prevent control characters from corrupting SVG
Bug fix by Maikel Houthuijzen
This commit is contained in:
parent
1ec0873caa
commit
eef59d150e
1 changed files with 7 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue