public function process(MinifyContext $context)
    {
        $contents = preg_replace_callback(
            '/'.
                Constants::$htmlEventNamePrefix.Constants::ATTRIBUTE_NAME_REGEX.'   # Match an on{attribute}
                \s*=\s*             # Match equals sign with optional whitespaces around it
                ["\']?              # Match an optional quote
                \s*javascript:      # Match the text "javascript:" which should be removed
            /xis',
            function ($match) {
                return str_replace('javascript:', '', $match[0]);
            }, $context->getContents());

        return $context->setContents($contents);
    }
public function process(MinifyContext $context)
    {
        $contents = preg_replace_callback(
            '/'.
                Constants::$htmlEventNamePrefix.Constants::ATTRIBUTE_NAME_REGEX.'   # Match an on{attribute}
                \s*=\s*             # Match equals sign with optional whitespaces around it
                ["\']?              # Match an optional quote
                \s*javascript:      # Match the text "javascript:" which should be removed
            /xis',
            function ($match) {
                return str_replace('javascript:', '', $match[0]);
            }, $context->getContents());

        return $context->setContents($contents);
    }
public function process ( MinifyContext $ context ) { $ contents = preg_replace_callback ( '/' . Constants :: $ htmlEventNamePrefix . Constants :: ATTRIBUTE_NAME_REGEX . '   # Match an on{attribute}
                \s*=\s*             # Match equals sign with optional whitespaces around it
                ["\']?              # Match an optional quote
                \s*javascript:      # Match the text "javascript:" which should be removed
            /xis' , function ( $ match ) { return str_replace ( 'javascript:' , '' , $ match [ 0 ] ) ; } , $ context -> getContents ( ) ) ; return $ context -> setContents ( $ contents ) ; }
Minify javascript prefixes on html event attributes.

@param \ArjanSchouten\HtmlMinifier\MinifyContext $context

@return \ArjanSchouten\HtmlMinifier\MinifyContext
Minify javascript prefixes on html event attributes .