Closed Bug 608327 Opened 14 years ago Closed 5 years ago

innerHTML getter canonicalizes "href" and "src" attributes inappropriately

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file)

The innerHTML getter incorrectly turns
  <math href="javascript:void 0"></math>
into
  <math href="javascript:void%200"></math>
OS: Mac OS X → All
Hardware: x86 → All
To which console?
Ah, it uses dump
We seem to do this quite on purpose.  In nsHTMLContentSerializer::SerializeHTMLAttributes we have:

      nsAutoString tempURI(valueStr);
      if (!isJS && NS_FAILED(EscapeURI(aContent, tempURI, valueStr)))
        valueStr = tempURI;

for href and src attributes.  This seems to have been done for bug 74137, but it's not clear to me whether we want it anymore....

Oh, and isJS is false because we only treat href/src that are javascript: on HTML/XUL/SVG nodes as isJS, and this is a MathML node.
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

I also can not reproduce this bug.

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: