Reputation: 1029
When I put something like £
or ©
into my TinyMCE editor and save the text, then when I load the text back from the database, it appears to turn into the actual £ and © characters. I don't want that. When I check my database, I see that these symbols are stored as £
and ©
, so it's not a storage problem. Also if I try to store the symbols as £
and ©
, that doesn't work either, as the character sequences are still converted into original symbols.
What can I do to fix this?
Thanks.
Upvotes: 2
Views: 3275
Reputation: 1029
It turns out that I can just htmlspecialchars() the text in my PHP script, and it correctly handles both the formatting and the sequences that are entered. This is rather unexpected, but it actually works out to do the right thing.
Upvotes: 1
Reputation: 50832
You may insert a zero-width-no-break-space between &
and pound
. This way the editor won't recognise it as an entity/character.
Upvotes: 1