zendframework / zend-escaper

Escaper component from Zend Framework
BSD 3-Clause "New" or "Revised" License
332 stars 30 forks source link

HTML escaping forward slash #23

Open lindonb opened 7 years ago

lindonb commented 7 years ago

OWASP recommends escaping the forward slash character in addition to the other characters normally escaped with PHP's htmlspecialchars() method. Any thought to adding that to the escapeHTML() method?

padraic commented 7 years ago

As far as I know, no modern browser currently in operation would be vulnerable to that character. Putting it another way:

All that said, there's no specific reason why there would not be a user agent which does support null end tags in one of their SGML or HTML profiles (not XML AFAIK where the null end tag must be enclosed). You might have to build that agent yourself though, or dig up a copy of something from the 90s.

weierophinney commented 4 years ago

This repository has been closed and moved to laminas/laminas-escaper; a new issue has been opened at https://github.com/laminas/laminas-escaper/issues/2.