From c4e236cce93b3f8a5f87dc098b336355012c587e Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Jul 2017 10:20:18 +0200 Subject: [PATCH] Doc: Fix header anchor detection --- modules/doc/library/Doc/DocParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/doc/library/Doc/DocParser.php b/modules/doc/library/Doc/DocParser.php index e65cd1b83..cdaaff81a 100644 --- a/modules/doc/library/Doc/DocParser.php +++ b/modules/doc/library/Doc/DocParser.php @@ -109,7 +109,7 @@ class DocParser if ($header === null) { return null; } - if ($header[0] === '<' + if (strpos($header, '<') !== false && preg_match('#(?:<(?Pa|span) (?:id|name)="(?P.+)">)\s*#u', $header, $match) ) { $header = str_replace($match[0], '', $header);