public function script($text)
    {
        return htmlspecialchars(
               $this->getService('anahita:filter.string')
               ->sanitize(AnHelperString::str_ireplace(array("\r\n", "\n"), '', $text)), ENT_QUOTES);
    }
public function script($text)
    {
        return htmlspecialchars(
               $this->getService('anahita:filter.string')
               ->sanitize(AnHelperString::str_ireplace(array("\r\n", "\n"), '', $text)), ENT_QUOTES);
    }
public function script ( $ text ) { return htmlspecialchars ( $ this -> getService ( 'anahita:filter.string' ) -> sanitize ( AnHelperString :: str_ireplace ( array ( "\r\n" , "\n" ) , '' , $ text ) ) , ENT_QUOTES ) ; }
Return a sanitized version of a text which can be assigned to a javascript variable.

@param string $text The text to sanitize

@return string
Return a sanitized version of a text which can be assigned to a javascript variable .