Validate HTML entities in JavaScript
- by Eduard Luca
I have a small JavaScript validation script that validates inputs based on Regex. I want to allow certain characters that are not exactly common (not sure if they're UTF8). For example I want to allow the following character ’, which looks like a single quote, but isn't.
I got the HTML code for this which is ’, but I'm not sure how to put this into the Regex.
I've tried just inputting [’]* but it doesn't validate.