I have xml with lots of unicode characters. This is coming out of a database where original ¶ is represented as ¶ (which in turn is correctly rendered as ¶ in HTML). However, CodeMirror displays as ¶. Is there some way of having CodeMirror render these sequences as HTML does, ie ¶?
Asked
Active
Viewed 1,461 times
3
-
You have to decode entities. Try this http://stackoverflow.com/questions/1912501/unescape-html-entities-in-javascript – aljordan82 Oct 07 '13 at 11:21
-
Figured that -- see below – peter Oct 07 '13 at 13:15
-
And that's why you don't store text encoded to some specific output medium in a database. :) – deceze Oct 07 '13 at 13:16
1 Answers
1
Figured out a solution -- basically convert the entities before submitting to codeMirror. See Value &# to unicode convert