GNOME Bugzilla – Bug 636660
xml:space="preserve" is not processed correctly
Last modified: 2017-12-13 17:45:21 UTC
Created attachment 175978 [details] [review] Patch to fix the issue For <text> elements (and its child elements, such as <tspan>), the SVG 1.1 and SVG 1.2 Tiny recommendations specify that tab and newline characters are to be converted into spaces, but only when `xml:space' has the value `preserve'. The solution, as I see it is to convert these characters in the "_rsvg_text_chomp" function in rsvg-text.c. See the attached patch. Thanks.
*** Bug 636661 has been marked as a duplicate of this bug. ***
Created attachment 205274 [details] [review] updated patch When I originally opened this bug, I was not entirely sure what effect 'lastwasspace' had on the string processing in _rsvg_text_chomp(). I have since verified that it can be safely ignored when xml:space="preserve" is set, so I added a code comment to make note of this. Let me know what you think. Thanks!
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/librsvg/issues/45.