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