r19526 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19525‎ | r19526 | r19527 >
Date:20:15, 20 January 2007
Author:robchurch
Status:old
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -983,7 +983,23 @@
984984 </p>
985985 !! end
986986
 987+!! test
 988+URL-encoding in URL functions (single parameter)
 989+!! input
 990+{{localurl:Some page|amp=&}}
 991+!! result
 992+<p>/index.php?title=Some_page&amp;amp=%26
 993+</p>
 994+!! end
987995
 996+!! test
 997+URL-encoding in URL functions (multiple parameters)
 998+!! input
 999+{{localurl:Some page|q=?&amp=&}}
 1000+!! result
 1001+<p>/index.php?title=Some_page&amp;q=%3F&amp;amp=%26
 1002+</p>
 1003+!! end
9881004
9891005 ###
9901006 ### Quotes