From 9195cb7a2e314a72047598195bd26b152f7a0413 Mon Sep 17 00:00:00 2001 From: Andrey Pozolotin Date: Wed, 1 Mar 2017 17:52:00 +0100 Subject: [PATCH] Added escape sequense --- library/HTMLPurifier/Filter/ExtractStyleBlocks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/HTMLPurifier/Filter/ExtractStyleBlocks.php b/library/HTMLPurifier/Filter/ExtractStyleBlocks.php index bc5d0da2..cc4324b6 100644 --- a/library/HTMLPurifier/Filter/ExtractStyleBlocks.php +++ b/library/HTMLPurifier/Filter/ExtractStyleBlocks.php @@ -95,7 +95,7 @@ class HTMLPurifier_Filter_ExtractStyleBlocks extends HTMLPurifier_Filter if ($tidy !== null) { $this->_tidy = $tidy; } - $html = preg_replace_callback('#(.*)#isU', array($this, 'styleCallback'), $html); + $html = preg_replace_callback('#(.*)<\/style>#isU', array($this, 'styleCallback'), $html); $style_blocks = array_filter($this->_styleMatches); $this->_styleMatches = array(); // reset $context->register('StyleBlocks', $style_blocks); // $context must not be reused