Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unescapeHTML() is casesensetive #251

Open
ranjanngc opened this issue Jul 3, 2014 · 1 comment
Open

unescapeHTML() is casesensetive #251

ranjanngc opened this issue Jul 3, 2014 · 1 comment

Comments

@ranjanngc
Copy link

Example :
var encodedHTML = "<b>"
var decodedHTML = encodedHTML.unescapeHTML();

//Result : "<b>"
//This is wrong it should be
should be :
function unescapeHTML() {
return this.stripTags().replace(/</gi,'<').replace(/>/gi,'>').replace(/&/gi,'&');
}

@savetheclocktower
Copy link
Collaborator

We may address this, but it's also important to remember that HTML entities are case-sensitive, and that &LT; is technically not the same as &lt;, even though browsers may treat them as the same thing for increased compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants