From ef126dbaffbf09a486d40951b27b6457429aa32d Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Wed, 17 Feb 2016 12:29:57 +0800 Subject: [PATCH] MDL-49807 mod_wiki: section detection regexp fix --- mod/wiki/parser/markups/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/wiki/parser/markups/html.php b/mod/wiki/parser/markups/html.php index 90d79343fce..26961b882c8 100644 --- a/mod/wiki/parser/markups/html.php +++ b/mod/wiki/parser/markups/html.php @@ -74,7 +74,7 @@ class html_parser extends nwiki_parser { $h1 = array("<\s*h{$minheaderlevel}\s*>", "<\/h{$minheaderlevel}>"); - $regex = "/(.*?)({$h1[0]}\s*".preg_quote($header, '/')."\s*{$h1[1]}.*?)((?:\n{$h1[0]}.*)|$)/is"; + $regex = "/(.*?)({$h1[0]}\s*".preg_quote($header, '/')."\s*{$h1[1]}.*?)((?:{$h1[0]}.*)|$)/is"; preg_match($regex, $text, $match); if (!empty($match)) {