After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 636660 - xml:space="preserve" is not processed correctly
xml:space="preserve" is not processed correctly
Status: RESOLVED OBSOLETE
Product: librsvg
Classification: Core
Component: general
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
: 636661 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-12-07 02:01 UTC by Patrick McCarty
Modified: 2017-12-13 17:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the issue (1.14 KB, patch)
2010-12-07 02:01 UTC, Patrick McCarty
none Details | Review
updated patch (1.55 KB, patch)
2012-01-14 20:58 UTC, Patrick McCarty
none Details | Review

Description Patrick McCarty 2010-12-07 02:01:20 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.
Comment 1 Fabio Durán Verdugo 2010-12-07 03:40:30 UTC
*** Bug 636661 has been marked as a duplicate of this bug. ***
Comment 2 Patrick McCarty 2012-01-14 20:58:46 UTC
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!
Comment 3 GNOME Infrastructure Team 2017-12-13 17:45:21 UTC
-- 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.