From 6c0cf20425189321808a7bd60ae5ccdad656a49a Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 13 Apr 2011 22:20:14 +0000 Subject: [PATCH] Readd support for headings inside tables, broken in r85922 and reported on its CodeReview. Added testcase for it. It changes again Parser24. --- includes/parser/Parser.php | 2 +- tests/parser/parserTests.txt | 25 ++++++++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 3eafec25d5..4ad1a52162 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -955,7 +955,7 @@ class Parser { $output =& $currentElement['content']; } else { - $output .= $outLine . "\n"; + $output .= "\n$outLine\n"; } } diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 4114ea5008..6a703bf3a5 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1406,6 +1406,23 @@ Invalid attributes in table cell (bug 1830) !! end +!! test +Heading inside table (affected by r85922) +!! input +{| +|- valign="top" +| +=== Heading === +|} +!! result + + + +
+

[edit] Heading

+
+ +!! end !! test Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html) @@ -5578,6 +5595,7 @@ http://===r:::https://b # # # +# Known to produce bad XML for now !! test Fuzz testing: Parser24 !! options @@ -5593,9 +5611,10 @@ MOVE YOUR MOUSE CURSOR OVER THIS TEXT | !! result

{{{| -}}}} > -
-

MOVE YOUR MOUSE CURSOR OVER THIS TEXT +

}}}} > +


+


+MOVE YOUR MOUSE CURSOR OVER THIS TEXT

-- 2.20.1