View Full Version : HTMLEditor removes attribute quotes in IE8

23 Mar 2012, 10:50 AM
Not sure if this an IE8 bug or an ExtJS one but figured I'd mention it anyway. If I create a simple HTMLEditor object, put an HTML string in it using .setValue(), wait for it to render and then try to pull the value out again with .getValue() it comes out missing quotes around some attributes.

Original String:
<span contenteditable='false'><input type='button' value='click me!' foo='test' onclick='alert(this)'/></span> more text"

Result String:
<SPAN contentEditable=false><INPUT onclick=alert(this) value="click me!" type=button foo="test"></SPAN> more text

Note that the contentEditable, onclick and type attributes lost their quotes but non-standard ones like foo were left alone. This causes a problem when parsing the HTML tags in Java because it regards unquoted attributes as invalid. I tried this same example in Chrome 17.0 and the original and result strings matched, hence not a problem.


23 Mar 2012, 12:33 PM
What Ext JS 4 version?

23 Mar 2012, 12:34 PM
Whoops. Forgot to mention that in the original.