TinyMCE: Do not convert Special Characters to Named Entities
Question by Guest | 2015-02-06 at 16:18
I still have a little problem with my TinyMCE HTML Editor. Using formatting and entering numbers or letters from A-Z is working well. But, however, problems arise as soon as trying to type accents, umlauts or other special characters.
For example, instead of writing the characters ä, ö and ü, TinyMCE is writing "ä", "ö" and "ü". So, TinyMCE is using the so-called named entities or named characters known from HTML.
Because on my website, all of my texts are UTF-8 encoded, I do not need those named entities. Rather, they are disturbing because they are making database searches impossible when words are containing a character of this kind.
Is there any possibility to configure TinyMCE in a way, that it is not using the named entities anymore?
Related Topics
TinyMCE Editor not shown after second call
Question | 3 Answers
PHP: Check Strings with Ctype-Functions for Character Classes
Article | 0 Comments
TinyMCE: Check if TinyMCE is available
Question | 1 Answer
PHP: Remove arbitrary Characters at the Beginning and the End of a String
Tutorial | 0 Comments
Rewrite Text Files with a fixed Line Length
Tutorial | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
You are searching for the option "entity_encoding" which can be set during initializing of TinyMCE:
With setting "entity_encoding" to "raw", all characters will no longer be stored as named entities except the characters " & < and > having a special meaning in HTML.
If "entity_encoding" is set to "named", the named entities such as ä are used. With setting "entity_encoding" to "numeric", the Unicode encoding (numeric entities) such as ä is used.
By the way, you can use PHP to free your text from the named entities:
For the opposite effect, you can use htmlentities() and htmlspecialchars().
2015-02-06 at 17:37