mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Prevent control characters from corrupting SVG
Bug fix by Maikel Houthuijzen
This commit is contained in:
parent
1ec0873caa
commit
eef59d150e
@ -206,6 +206,13 @@ int svg_plot(struct zint_symbol *symbol) {
|
|||||||
}
|
}
|
||||||
addon[r] = '\0';
|
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) {
|
if (ustrlen(local_text) != 0) {
|
||||||
textoffset = 9;
|
textoffset = 9;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user