I need help in understanding the actual actions of a helper function in Zend Framework.
I need someone to explain to me what $this->escape($string)
actually does to the string passed to it before printing the string into the template.
$this->escape()
escapes a string according to settings you can provide with $this->setEscape('functionname')
, by default it is PHP's htmlspecialchars function.
http://framework.zend.com/manual/en/zend.view.scripts.html
It calls the htmlspecialchars PHP function.
The translations performed are:
- '&' (ampersand) becomes '&'
- '"' (double quote) becomes '"'
- '<' (less than) becomes '<'
- '>' (greater than) becomes '>'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With