Converting diacritics to numerical HTML code with HTML Purifier
-
27-10-2019 - |
Question
I'm having trouble finding the correct setting for HTML Purifier 4.3.0
to convert diacritics to numerical HTML code. Is this possible using this library?
So, from încă
to încă 
.
Solution
As you can see in the demo: by default: no. To me, but there isn't a clear description of what it does and doesn't, HTML Purifier looks like it's meant to strip html tags from input.
I think you're better off using htmlentities().
OTHER TIPS
If you're working in UTF-8 mode, as HTML Purifier does by default, there's no need to escape character entities. If you tell HTML Purifier that you're working in ASCII mode, it will do so for you.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow