protected function tokenizeGlobalExclusions($html)
    {
        $html              = (string) $html;
        $_this             = $this;
        $global_exclusions = [
            '/\<noscript(?:\s[^>]*)?\>.*?\<\/noscript\>/uis',
        ];
        $html = preg_replace_callback(
            $global_exclusions,
            function ($m) use ($_this) {
                $_this->current_global_exclusion_tokens[] = $m[0]; // Tokenize.
                return '<htmlc-gxt-'.(count($_this->current_global_exclusion_tokens) - 1).' />';
            },
            $html // Exclusions replaced by tokens.
        );
        return $html;
    }
protected function tokenizeGlobalExclusions($html)
    {
        $html              = (string) $html;
        $_this             = $this;
        $global_exclusions = [
            '/\<noscript(?:\s[^>]*)?\>.*?\<\/noscript\>/uis',
        ];
        $html = preg_replace_callback(
            $global_exclusions,
            function ($m) use ($_this) {
                $_this->current_global_exclusion_tokens[] = $m[0]; // Tokenize.
                return '<htmlc-gxt-'.(count($_this->current_global_exclusion_tokens) - 1).' />';
            },
            $html // Exclusions replaced by tokens.
        );
        return $html;
    }
protected function tokenizeGlobalExclusions ( $ html ) { $ html = ( string ) $ html ; $ _this = $ this ; $ global_exclusions = [ '/\<noscript(?:\s[^>]*)?\>.*?\<\/noscript\>/uis' , ] ; $ html = preg_replace_callback ( $ global_exclusions , function ( $ m ) use ( $ _this ) { $ _this -> current_global_exclusion_tokens [ ] = $ m [ 0 ] ; // Tokenize. return '<htmlc-gxt-' . ( count ( $ _this -> current_global_exclusion_tokens ) - 1 ) . ' />' ; } , $ html // Exclusions replaced by tokens. ) ; return $ html ; }
Global exclusion tokenizer.

@since 150821 Adding global exclusion tokenizer.

@param string $html Input HTML code.

@return string HTML code, after tokenizing exclusions.
Global exclusion tokenizer .