Open Bug 536201 Opened 15 years ago Updated 3 years ago

Midas: innerHTML of content editable is encoding special characters in anchor href

Categories

(Core :: DOM: Editor, defect, P5)

x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: marcosalmeida, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.15) Gecko/2009101601 Firefox/3.0.15 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.15) Gecko/2009101601 Firefox/3.0.15 (.NET CLR 3.5.30729)

When you create a link in the Midas demo that contains a character like ~ in the url, when you view the html source it gets encoded to %7E.

Reproducible: Always

Steps to Reproduce:
1. Go to http://www.mozilla.org/editor/midasdemo/
2. Type ~ and select all
3. Click the insert link button in the first toolbar
4. Type ~ in the resulting dialog
  --> A link is created
5. Click the View HTML Source checkbox under the editable field
Actual Results:  
<a href="%7E">~</a><br>

Expected Results:  
<a href="~">~</a><br>

To verify what's going on, type in firebug console:

document.getElementById('edit').contentDocument.body.firstChild.href
This shows the correct expected url (made absolute), "http://www.mozilla.org/editor/midasdemo/~"

document.getElementById('edit').contentDocument.body.innerHTML
This shows the incorrect actual url within the innerHTML of the editable field, "<a href="%7E">~</a><br>"


This affects Google properties

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.