Closed
Bug 1125560
Opened 9 years ago
Closed 9 years ago
Data URL truncated at first octothorpe (#)
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jhuffman, Unassigned)
Details
(Whiteboard: DUPEME)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Safari/537.36 Firefox for Android Steps to reproduce: input the following into the url bar of FireFox. data:image/svg+xml;utf8,<svg preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" viewBox="0 0 45 315" enable-background="new 0 0 45 315" xml:space="preserve"><path fill-rule="evenodd" fill="#333333" clip-rule="evenodd" d="M0 0l45 158L0 315V0z"/></svg> Actual results: You will notice that it throws an "XML Parsing Error: unclosed token" exception even though it is a valid SVG. I have debugged the issue and it appears to be the hex fill color due to the hash tag. Users can use rgb or html supported text colors as a work around. Expected results: This exact image should render. data:image/svg+xml;utf8,<svg preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" viewBox="0 0 45 315" enable-background="new 0 0 45 315" xml:space="preserve"><path fill-rule="evenodd" fill="rgb(51,51,51)" clip-rule="evenodd" d="M0 0l45 158L0 315V0z"/></svg>
Updated•9 years ago
|
Product: Firefox → Core
Summary: Throws "XML Parsing Error: unclosed token" when using a hash tag (#) in svgs → Data URL truncated at first octothorpe (#)
Whiteboard: DUPEME
Comment 1•9 years ago
|
||
Firefox is correct per the relevant specifications, # is the start of a URL fragment. A # character must be url escaped as %23 (as must various others).
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Comment 2•7 years ago
|
||
Moving from Core::Untriaged to Core::General https://bugzilla.mozilla.org/show_bug.cgi?id=1407598
Component: Untriaged → General
You need to log in
before you can comment on or make changes to this bug.
Description
•