RESOLVED INVALID 43914
Unicode Chars don't work with innerHTML
https://bugs.webkit.org/show_bug.cgi?id=43914
Summary Unicode Chars don't work with innerHTML
Mike Wilcox
Reported 2010-08-12 06:30:36 PDT
Observed on Safari 5.0.1 6533.17.8 (why don't you guys update the version drop down?) Unicode works correctly in HTML: <p>&#10005</p> But does not work dynamically: document.getElementsByTagName("div")[0].innerHTML = "&#10005"; I know innerHTML is non-standard, so I tried the following. I may not have done it right: document.getElementsByTagName("div")[0].appendChild(document.createTextNode("&#10005")) Finally, I found there is a work-around by adding a space after: document.getElementsByTagName("div")[0].innerHTML = "&#10005 "; // works!!
Attachments
Mike Wilcox
Comment 1 2010-08-12 08:46:34 PDT
Never mind. I forgot the semi-colon. It worked in Firefox without it. They've led me astray before!!
Note You need to log in before you can comment on or make changes to this bug.