From 144ffcc01aac0152edb200f36989786e47bcfdbc Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Tue, 6 Dec 2011 10:50:47 +0000 Subject: [PATCH] allow bold in TOC lines just like r102179 allowed italics in TOC lines for bug 26375, this patch allow bold text as well. --- includes/parser/Parser.php | 2 +- tests/parser/parserTests.txt | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 881133b721..a3748e1ca0 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -4051,7 +4051,7 @@ class Parser { # Strip out HTML (other than plain and : bug 8393, or : bug 26375) $tocline = preg_replace( - array( '#<(?!/?(sup|sub|i)).*?'.'>#', '#<(/?(sup|sub|i)).*?'.'>#' ), + array( '#<(?!/?(sup|sub|i|b)).*?'.'>#', '#<(/?(sup|sub|i|b)).*?'.'>#' ), array( '', '<$1>' ), $safeHeadline ); diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 6fea87148e..e5688bfc38 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -8957,6 +8957,23 @@ __TOC__ !! end +!! test +Bug 26375: TOC with bold +!! options +title=[[Main Page]] +!! input +__TOC__ +== '''should be bold''' then normal text == +!! result +

Contents

+ +
+

[edit] should be bold then normal text

+ +!! end + !! article MediaWiki:Bug32057 !! text -- 2.20.1