Closed Bug 733345 Opened 14 years ago Closed 14 years ago

Using hash character in SVG foreignObject

Categories

(Core :: SVG, defect)

10 Branch
x86_64
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: niklasvh, Unassigned)

Details

Attachments

(1 file)

Attached file svg.html
User Agent: Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 Steps to reproduce: I am trying to get HTML to render within an SVG, using foreignObject. It is working fine, except when a hash (#) character is in it. For a more clear example, see http://jsfiddle.net/niklasvh/mqESS/ (or the attachment). It should append 2 SVG images to the page, with one containing html that still has the # characters intact and the other one where the # characters have been removed. This works fine in both Chrome and Opera, but not in Firefox stable (or Aurora). Actual results: The SVG with the # characters fails to render, with the error "no element found" referring to the location where the first # appears. Expected results: In both Chrome and Opera, the SVG renders HTML that has the # character just fine, and as it is under xmlns='http://www.w3.org/1999/xhtml' it should be treated the same way as it is treated in html.
See https://developer.mozilla.org/en/data_URIs#Common_problems, "Note: as of Firefox 6, fragments (anchors) are processed consistent with other URI schemes, thus a bare "#" in the content needs to be escaped as '%23'." (and see Bug 658949)
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: