r5946 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5945‎ | r5946 | r5947 >
Date:07:33, 17 October 2004
Author:vibber
Status:old
Tags:
Comment:
Add test for links with double-escaped hex codes (raw hex codes in titles are now illegal as they don't survive round-trip conversion and thus are inaccessible)
Modified paths:
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -856,8 +856,34 @@
857857 </p>
858858 !! end
859859
 860+!! test
 861+Link containing % (not as a hex sequence)
 862+!! input
 863+[[7% Solution]]
 864+!! result
 865+<p><a href="https://www.mediawiki.org/index.php?title=7%25_Solution&amp;action=edit" class="new" title="7% Solution">7% Solution</a>
 866+</p>
 867+!! end
860868
861869 !! test
 870+Link containing % as a single hex sequence interpreted to char
 871+!! input
 872+[[7%25 Solution]]
 873+!! result
 874+<p><a href="https://www.mediawiki.org/index.php?title=7%25_Solution&amp;action=edit" class="new" title="7% Solution">7% Solution</a>
 875+</p>
 876+!!end
 877+
 878+!! test
 879+Link containing % as a double hex sequence interpreted to hex sequence
 880+!! input
 881+[[7%2525 Solution]]
 882+!! result
 883+<p>[[7%2525 Solution]]
 884+</p>
 885+!!end
 886+
 887+!! test
862888 Plain link to URL
863889 !! input
864890 [[http://www.example.org]]

Status & tagging log