Folks,
I need to send the edited text via XML. Certain characters, such as a non-breaking space, are converted by the editor to their html entity equivalent (such as ). Many of these are not valid within XML documents. They must be converted to their unicode equivalent (in this case,  ).
Question: Is there a configuration setting to force the editor to convert to unicode rather than html? By the way, I DO NOT want html tags to be converted; < and > need to remain < and >, respectively.
Thanks in advance.
Joel
I need to send the edited text via XML. Certain characters, such as a non-breaking space, are converted by the editor to their html entity equivalent (such as ). Many of these are not valid within XML documents. They must be converted to their unicode equivalent (in this case,  ).
Question: Is there a configuration setting to force the editor to convert to unicode rather than html? By the way, I DO NOT want html tags to be converted; < and > need to remain < and >, respectively.
Thanks in advance.
Joel
Re: Convert html entities to unicode
Re: Convert html entities to unicode
DIna,
Thanks. That's just what I was looking for.
Interstingly, it does not solve my problem, as I put the resulting string into the innerHTML of a DIV, which converts certain unicode entries back to html entities. For example, a " ," coming out of the editor is changed to " " when it is placed into the DIV. This behavior is seen with both IE and Firefox.
Curiously, if I put the resulting text into the value of an "INPUT type=text" (as opposed to the innerHTML of a DIV) the unicode entities are preserved. But then the text is displayed without formatting.
My solution is to use a PHP function (strtr) to convert the entities before populating my database.
Thanks again for your suggestion.
/Joel
Re: Convert html entities to unicode
Check out the AdditionalNumericEntities settings.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn