.*?#is', '', $html ); if ( null === $replace ) { return $html; } $replace = preg_replace( '//Uis', '', $replace ); if ( null === $replace ) { return $html; } return $replace; } /** * Hides scripts from the HTML to be parsed when removing CSS from it * * @since 3.10.2 * * @param string $html HTML content. * * @return string */ protected function hide_scripts( $html ) { $replace = preg_replace( '#]*>.*?<\/script\s*>#mis', '', $html ); if ( null === $replace ) { return $html; } return $replace; } /** * Hides