This $ this-> escape () in the Zend view is enough for xss

I do a lot $this->escape()in zend view. Is this enough to prevent XSS?

There HTMLPurifier outside of the Zend Framework. I wonder how zend $this->escape()compares with HTMLPurifier.

+5
source share
2 answers

escape is an alias of htmlspecialchars. It allows you to display plain text, while HTMLPurifier allows you to display safe HTML.

You cannot have plaintext XSS.

HTMLPurifier strip_tags, HTML, (, ).

+4

HTMLPurifier . HTMLPurifier HTML... , . , , , HTML, , . HTML, , /.

escape() HTML- HTML, , HTML (, & โ†’ &amp;, < โ†’ &lt;, > โ†’ &gt; ..).

.

XSS? , , .

+4

All Articles