moved strip style/script
This commit is contained in:
parent
677d507fe9
commit
3d1a0af6cb
2 changed files with 2 additions and 2 deletions
|
@ -208,6 +208,8 @@ class Shortcodes {
|
|||
$content = wp_filter_content_tags( $content );
|
||||
}
|
||||
|
||||
// replace script and style elements
|
||||
$content = \preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $content );
|
||||
$content = strip_shortcodes( $content );
|
||||
$content = \trim( \preg_replace( '/[\n\r\t]/', '', $content ) );
|
||||
|
||||
|
|
|
@ -508,8 +508,6 @@ class Post {
|
|||
$content = do_shortcode( $content );
|
||||
wp_reset_postdata();
|
||||
|
||||
// replace script and style elements
|
||||
$content = \preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $content );
|
||||
$content = \wp_kses( $content, $this->allowed_tags );
|
||||
$content = \wpautop( $content );
|
||||
$content = \preg_replace( '/[\n\r\t]/', '', $content );
|
||||
|
|
Loading…
Reference in a new issue