From: Rob Church
Date: Sat, 20 Jan 2007 20:15:33 +0000 (+0000)
Subject: Add some parser tests for URL-encoding in URL functions. The second case could be...
X-Git-Tag: 1.31.0-rc.0~54268
X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=commitdiff_plain;h=c7c44cf48894a5eef21c77373e731f160f6eaf77;p=lhc%2Fweb%2Fwiklou.git
Add some parser tests for URL-encoding in URL functions. The second case could be difficult to fix, because something like {{localurl:Some page|amp=&&b=2}} is ambiguous.
---
diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt
index 1df9c3ff94..0a2951a678 100644
--- a/maintenance/parserTests.txt
+++ b/maintenance/parserTests.txt
@@ -983,7 +983,23 @@ External link containing double-single-quotes in text embedded in italics (bug 4
!! end
+!! test
+URL-encoding in URL functions (single parameter)
+!! input
+{{localurl:Some page|amp=&}}
+!! result
+/index.php?title=Some_page&=%26
+
+!! end
+!! test
+URL-encoding in URL functions (multiple parameters)
+!! input
+{{localurl:Some page|q=?&=&}}
+!! result
+/index.php?title=Some_page&q=%3F&=%26
+
+!! end
###
### Quotes