Index: parserTests.inc =================================================================== --- parserTests.inc (revision 15862) +++ parserTests.inc (working copy) @@ -334,7 +334,7 @@ 'wgLanguageCode' => $lang, 'wgContLanguageCode' => $lang, 'wgDBprefix' => 'parsertest_', - + 'wgRawHtml' => preg_match('/\\brawhtml\\b/i', $opts), 'wgLang' => null, 'wgContLang' => null, 'wgNamespacesWithSubpages' => array( 0 => preg_match('/\\bsubpage\\b/i', $opts)), Index: parserTests.txt =================================================================== --- parserTests.txt (revision 15862) +++ parserTests.txt (working copy) @@ -5763,6 +5763,224 @@ !!end + +!! test +[Before] HTML without raw HTML enabled ($wgRawHtml==false) +!! input + +!! result +

<html><script>alert(1);</script></html> +

+!! end + +!! test +HTML with raw HTML ($wgRawHtml==true) +!! options +rawhtml +!! input + +!! result +

+

+!! end + + +!! test +Parents of subpages, one level up +!! options +subpage title=[[Subpage test/L1/L2/L3]] +!! input +[[../|L2]] +!! result +

L2 +

+!! end + + +!! test +Parents of subpages, one level up, not named +!! options +subpage title=[[Subpage test/L1/L2/L3]] +!! input +[[../]] +!! result +

Subpage test/L1/L2 +

+!! end + + + +!! test +Parents of subpages, two levels up +!! options +disabled +subpage title=[[Subpage test/L1/L2/L3]] +!! input +[[../../|L1]]2 +!! result +

L1 +

+!! end + +# Question: should result be "/index.php?title=Subpage_test/L1&action=edit" instead? +!! test +Parents of subpages, two levels up, without trailing slash or name. +!! options +subpage title=[[Subpage test/L1/L2/L3]] +!! input +[[../..]] +!! result +

../.. +

+!! end + +# Question: Why should the link text in the above test be "../..", yet in this test the "../.." part is silently dropped? +# Current result:

/// +!! test +Parents of subpages, two levels up, with lots of extra trailing slashes. +!! options +subpage title=[[Subpage test/L1/L2/L3]] +!! input +[[../../////]] +!! result +

Subpage test/L1 +

+!! end + +!! test +Definition list code coverage +!! input +; title : def +; title : def +;title: def +!! result +
title  
def +
title 
def +
title
def +
+ +!! end + +!! test +Don't fall for the self-closing div +!! input +
hello world
+!! result +
hello world
+ +!! end + + +!! test +MSGNW magic word +!! input +{{MSGNW:msg}} +!! result +

[[Template:Msg]] +

+!! end + +!! test +RAW magic word +!! input +{{RAW:QUERTY}} +!! result +

Template:QUERTY +

+!! end + +!! test +Always escape literal '>' in output, not just after '<' +!! input +><> +!! result +

><> +

+!! end + +!! test +Template caching +!! input +{{Test}} +{{Test}} +!! result +

This is a test template +This is a test template +

+!! end + + +!! article +MediaWiki:Fake +!! text +==header== +!! endarticle + +!! test +Inclusion of !userCanEdit() content +!! input +{{MediaWiki:Fake}} +!! result +
[edit]

header

+ +!! end + + +!! test +Out-of-order TOC heading levels +!! input +==2== +======6====== +===3=== +=1= +=====5===== +==2== +!! result +

Contents

+ +
+
[edit]

2

+
[edit]
6
+
[edit]

3

+
[edit]

1

+
[edit]
5
+
[edit]

2

+ +!! end + + +!! test +ISBN with a dummy number +!! input +ISBN --- +!! result +

ISBN +

+!! end + + +!! test +Pages in namespace (Magic word disabled currently) +!! input +{{PAGESINNAMESPACE:}} +!! result + +!! end + + # # #