#13427 closed defect (fixed)
dijit.Editor does not allow single quotes in an img alt attribute in IE
Reported by: | philip | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | Editor | Version: | 1.6.0 |
Keywords: | dijit.Editor img alt IE | Cc: | |
Blocked By: | Blocking: |
Description
I believe there is an error in dijit._editor.getNodeHtml. In IE, it does not parse html that looks liks, <img alt="" src="..."/>
The single quotes inside the alt tag is legal HTML, but in IE, getNodeHtml turns this html into:
<img alt=""/>
I am attaching a test case that demonstrates the problem. If you run it with the IE developer tool you will see that the html written to the editor is not the same html that is read back.
If you write this to the editor,
var html = "<img alt=\"\" src=\"http://blogsearch.google.com/blogsearch/intl/en_ALL/images/blogs_logo.gif\">"; editor.set('value', html);
you will not be able to read it back in IE. It is fine in other browsers. I believe the regexp code in getNodeHtml makes the assumption that quotes and doublequotes are not nested inside each other.
Attachments (2)
Change History (6)
Changed 8 years ago by
Attachment: | dijit20.html added |
---|
comment:1 Changed 8 years ago by
Component: | General → Editor |
---|
comment:2 Changed 8 years ago by
The single quotes got removed in the original post.
This html cannot be read back from dijit.Editor in IE:
var html = "<img alt=\"''\" src=\"http://blogsearch.google.com/blogsearch/intl/en_ALL/images/blogs_logo.gif\">"; editor.set('value', html);
comment:3 Changed 8 years ago by
Owner: | set to Jared Jurkiewicz |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In [27840]:
comment:4 Changed 8 years ago by
Milestone: | tbd → 1.8 |
---|
Test application that writes an <img> tag to the editor and reads it back. This does not work in IE.