Closed Bug 1430526 Opened 6 years ago Closed 6 years ago

Cannot parse SVG XML if the fill attribute contains hash '#'

Categories

(Core :: XML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: TYLin, Unassigned)

Details

While fixing the test [1], I found that the following data uri cannot be parsed because the fill attribute contains the hash '#' character.

It can be reproduced by copy and paste the following to the url bar.

data:image/svg+xml;utf8,<svg width="100px" height="100px" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d=" M 0.00 0.00 L 50.00 0.00 C 50.00 33.33 50.00 66.67 50.00 100.00 L 0.00 100.00 L 0.00 0.00 Z"  fill="#006400" /></svg>

If I substitute '#' by '%23', it works fine. This seems like a bug because the ' ' space character is escaped.

Google Chrome has no issue parsing this, btw.

[1] https://dxr.mozilla.org/mozilla-central/source/testing/web-platform/tests/css/css-shapes/shape-outside/shape-image/shape-image-002.html
# is reserved as the start of a fragment identifier (https://en.wikipedia.org/wiki/Fragment_identifier). Chrome is buggy but the Chrome developers already know.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.