Closed Bug 608338 Opened 14 years ago Closed 5 years ago

innerHTML getter should use "xlink:" prefix when needed

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file)

Round-tripping a valid xlink:href through innerHTML turns it into a namespaceless, and therefore non-working, href attribute.

This may be a bug or under-specification in the HTML5 spec:
http://www.whatwg.org/specs/web-apps/current-work/#html-fragment-serialization-algorithm
"For each attribute that the element has, append a U+0020 SPACE character, the attribute's name..., a U+003D EQUALS SIGN character, ..."
Yeah, it's not clear how best to handle this.  We certainly don't want to support serializing abitrary namespaced gunk in the HTML serializer....

That said, maybe we should use the qualified name, not the localName, when serializing?  It's the same thing in the common case, and should do the right thing here.
The HTML parser recognizes the "xlink:" prefix as special. I think the serializer should mirror this by emitting "xlink:" in precisely the cases where doing so will cause the parser to handle it better.
I can't reproduce this issue anymore on today's nightly (the test passes). Can you confirm?
Flags: needinfo?(jruderman)
Component: DOM → DOM: Core & HTML

(In reply to Thomas Wisniewski from comment #4)

I can't reproduce this issue anymore on today's nightly (the test passes).
Can you confirm?

I can confirm.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(jruderman)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: