public function generateScriptFromToken($token)
    {
        if (!$token instanceof HTMLPurifier_Token_Text) {
            return $this->generateFromToken($token);
        }
        // Thanks <http://lachy.id.au/log/2005/05/script-comments>
        $data = preg_replace('#//\s*$#', '', $token->data);
        return '<!--//--><![CDATA[//><!--' . "\n" . trim($data) . "\n" . '//--><!]]>';
    }
public function generateScriptFromToken($token)
    {
        if (!$token instanceof HTMLPurifier_Token_Text) {
            return $this->generateFromToken($token);
        }
        // Thanks <http://lachy.id.au/log/2005/05/script-comments>
        $data = preg_replace('#//\s*$#', '', $token->data);
        return '<!--//--><![CDATA[//><!--' . "\n" . trim($data) . "\n" . '//--><!]]>';
    }
public function generateScriptFromToken ( $ token ) { if ( ! $ token instanceof HTMLPurifier_Token_Text ) { return $ this -> generateFromToken ( $ token ) ; } // Thanks <http://lachy.id.au/log/2005/05/script-comments> $ data = preg_replace ( '#//\s*$#' , '' , $ token -> data ) ; return '<!--//--><![CDATA[//><!--' . "\n" . trim ( $ data ) . "\n" . '//--><!]]>' ; }
Special case processor for the contents of script tags
@param HTMLPurifier_Token $token HTMLPurifier_Token object.
@return string
@warning This runs into problems if there's already a literal
--> somewhere inside the script contents.
Special case processor for the contents of script tags