diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-28 10:33:14 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-28 10:33:14 +0000 |
| commit | fa9ae5fb7c249a4c96a06bfef905c73cbb17bc3d (patch) | |
| tree | 8c06d1d61a79a74381cb75a925ef50dd598da8c2 /src/xml | |
| parent | Trying libFuzzer (diff) | |
| parent | Fix XML text parsing bug. (diff) | |
| download | inkscape-fa9ae5fb7c249a4c96a06bfef905c73cbb17bc3d.tar.gz inkscape-fa9ae5fb7c249a4c96a06bfef905c73cbb17bc3d.zip | |
Merge branch 'master' of https://gitlab.com/inkscape/inkscape
Diffstat (limited to 'src/xml')
| -rw-r--r-- | src/xml/repr-io.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp index 725b313b1..2ff9d4776 100644 --- a/src/xml/repr-io.cpp +++ b/src/xml/repr-io.cpp @@ -561,7 +561,10 @@ static Node *sp_repr_svg_read_node (Document *xml_doc, xmlNodePtr node, const gc return NULL; // empty text node } - bool preserve = (xmlNodeGetSpacePreserve (node) == 1); + // Since libxml2 2.9.0, only element nodes are checked, thus check parent. + // Note: this only handles XML's rules for white space. SVG's specific rules + // are handled in sp-string.cpp. + bool preserve = (xmlNodeGetSpacePreserve (node->parent) == 1); xmlChar *p; for (p = node->content; *p && g_ascii_isspace (*p) && !preserve; p++) |
