Joomla escape() Method

Html View

The function escapes a value for output in a view script. The ENT_COMPAT flag will be replaced by ENT_QUOTES in Joomla 4.0 to also escape single quotes.

  • mixed $var - The output to escape.
  • return mixed - The escaped value.
public function escape($var)
if (in_array($this->_escape, array('htmlspecialchars', 'htmlentities')))
return call_user_func($this->_escape, $var, ENT_COMPAT, $this->_charset);

return call_user_func($this->_escape, $var);


Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive