Closed FrontSide closed 54 years ago
Ok this is fiexed now. But not comletely clean. What I do now is to look for HTML-Char-Entities and replace them with the corresponding ASCII character.
str.replace(/&#(\d+);/g, function (m, n) { return String.fromCharCode(n); })
Thanks to http://stackoverflow.com/a/528786/1686904 at this place.
Problem is now that if a user wants to actually display an HTML-Char-Entity this one's converted as well...
Not fixed for >>"<< and >>&<< characters
Certain characters like the single quote >> ' << are not converted from HTML code back to an ASCII character when editing the Post.
That means, the character >> ' << becomes >> ' << once we try to edit the Post!