?\#\\\\]|$))#'; } $result = preg_replace( $pattern, 'https://', $text ); // On a PCRE failure leave the output untouched rather than blank the page. return null === $result ? $text : $result; } function edznet_https_content( $content ) { return edznet_https_replace( $content ); } function edznet_https_start_buffer() { ob_start( 'edznet_https_buffer_callback' ); } function edznet_https_buffer_callback( $buffer ) { return edznet_https_replace( $buffer ); }