Sample conversions:
& -> `&`
> -> `>`
Any small library function that can handle this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have on my utility belt this tiny function always:
It will work for all HTML Entities.
Edit: Since you aren’t in a DOM environment, I think you will have to do it by the “hard” way:
If you don’t like the chained replacements, you could build an object to store your entities, e.g.: