chriso/validator.js — pull request #334 by galanonym (2014-12-11 13:11:38+00:00)
Title: Add option for stronger escaping of / character, according to OWASP

According to OWASP prevention cheat sheet [1], character / should be replaced by &#x2F; entity. I added a flag to escape() method, that makes it able to use an OWASP compatible escape method that should be more secure.

[1] https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content