Index: trunk/phase3/tests/parser/parserTests.txt |
— | — | @@ -8957,6 +8957,23 @@ |
8958 | 8958 | |
8959 | 8959 | !! end |
8960 | 8960 | |
| 8961 | +!! test |
| 8962 | +Bug 26375: TOC with bold |
| 8963 | +!! options |
| 8964 | +title=[[Main Page]] |
| 8965 | +!! input |
| 8966 | +__TOC__ |
| 8967 | +== '''should be bold''' then normal text == |
| 8968 | +!! result |
| 8969 | +<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
| 8970 | +<ul> |
| 8971 | +<li class="toclevel-1 tocsection-1"><a href="#should_be_bold_then_normal_text"><span class="tocnumber">1</span> <span class="toctext"><b>should be bold</b> then normal text</span></a></li> |
| 8972 | +</ul> |
| 8973 | +</td></tr></table> |
| 8974 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Main_Page&action=edit&section=1" title="Edit section: should be bold then normal text">edit</a>]</span> <span class="mw-headline" id="should_be_bold_then_normal_text"> <b>should be bold</b> then normal text </span></h2> |
| 8975 | + |
| 8976 | +!! end |
| 8977 | + |
8961 | 8978 | !! article |
8962 | 8979 | MediaWiki:Bug32057 |
8963 | 8980 | !! text |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -4051,7 +4051,7 @@ |
4052 | 4052 | |
4053 | 4053 | # Strip out HTML (other than plain <sup> and <sub>: bug 8393, or <i>: bug 26375) |
4054 | 4054 | $tocline = preg_replace( |
4055 | | - array( '#<(?!/?(sup|sub|i)).*?'.'>#', '#<(/?(sup|sub|i)).*?'.'>#' ), |
| 4055 | + array( '#<(?!/?(sup|sub|i|b)).*?'.'>#', '#<(/?(sup|sub|i|b)).*?'.'>#' ), |
4056 | 4056 | array( '', '<$1>' ), |
4057 | 4057 | $safeHeadline |
4058 | 4058 | ); |