summaryrefslogtreecommitdiffstats
path: root/src/svg
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-09-12 21:08:00 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-09-12 21:08:00 +0000
commitfdec8836e698fd195be7d9dffaa98f1ea033fe6c (patch)
tree8df9fef10981bfaebb0853ebc7a5b1878b3c93b2 /src/svg
parentfix Windows build (diff)
downloadinkscape-fdec8836e698fd195be7d9dffaa98f1ea033fe6c.tar.gz
inkscape-fdec8836e698fd195be7d9dffaa98f1ea033fe6c.zip
Fix handling of SVG lengths with spaces between value and unit (hopefully without breaking things this time) [Bug #1208002].
Fixed bugs: - https://launchpad.net/bugs/1208002 (bzr r12508)
Diffstat (limited to 'src/svg')
-rw-r--r--src/svg/svg-length.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/svg/svg-length.cpp b/src/svg/svg-length.cpp
index 05a3ef4b8..09662991b 100644
--- a/src/svg/svg-length.cpp
+++ b/src/svg/svg-length.cpp
@@ -334,6 +334,8 @@ So after the number, the string does not necessarily have a \0 or a unit, it mig
*next = (char *) e + 1;
}
return 1;
+ } else if (g_ascii_isspace(e[0]) && g_ascii_isalpha(e[1])) {
+ return 0; // spaces between value and unit are not allowed
} else {
/* Unitless */
if (unit) {