Closed
Bug 595338
Opened 16 years ago
Closed 16 years ago
execCommand 'insertHTML' removes attributes in FF 3.6.9
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 595176
People
(Reporter: hans, Unassigned)
Details
Attachments
(1 file)
|
411 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100825 Ubuntu/9.10 (karmic) Firefox/3.6.9
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100825 Ubuntu/9.10 (karmic) Firefox/3.6.9
document.execCommand 'insertHTML' filters attributes of HTML elements. It removes the attribute if it is not valid HTML4. New HTML5 or non-standard attributes cannot be inserted with insertHTML.
Reproducible: Always
Steps to Reproduce:
1. Create a div with contenteditable = "true"
2. Put caret inside the div.
3. Apply document.execCommand('insertHTML', false, '<div class="bar" draggable="true" contenteditable="true" foo="bar">bar</div>')
Actual Results:
The innerHTML of the div is: <div class="bar" >bar</div>
Expected Results:
The innerHTML of the div should be: <div class="bar" draggable="true" contenteditable="true" foo="bar">bar</div>
This is a change in behavior in FF 3.6.9. Prior versions did not filter / remove attributes.
Component: General → Editor
Product: Firefox → Core
Version: 3.6 Branch → 1.9.2 Branch
Updated•16 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•