r78953 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78952‎ | r78953 | r78954 >
Date:10:24, 24 December 2010
Author:bawolff
Status:ok
Tags:
Comment:
follow up to r78952 add parser tests relating to internal links with % encoding and + signs in them.
Modified paths:
  • /trunk/phase3/tests/parser/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/parser/parserTests.txt
@@ -8142,6 +8142,16 @@
81438143 !! end
81448144
81458145 !! test
 8146+percent-encoding and + signs in comments (Bug 26410)
 8147+!! options
 8148+comment
 8149+!!input
 8150+[[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
 8151+!! result
 8152+<a href="https://www.mediawiki.org/index.php?title=ABC3D%25_%2B%2B&amp;action=edit&amp;redlink=1" class="new" title="ABC3D% ++ (page does not exist)">ABC3D% ++</a> <a href="https://www.mediawiki.org/index.php?title=ABC3D%25_%2B%2B&amp;action=edit&amp;redlink=1" class="new" title="ABC3D% ++ (page does not exist)">+%20</a>
 8153+!! end
 8154+
 8155+!! test
81468156 Bad images - basic functionality
81478157 !! input
81488158 [[File:Bad.jpg]]
@@ -8327,6 +8337,20 @@
83288338
83298339 !! end
83308340
 8341+!! test
 8342+percent-encoding and + signs in internal links (Bug 26410)
 8343+!! input
 8344+[[User:+%]] [[Page+title%]]
 8345+[[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
 8346+[[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
 8347+[[%33%45]] [[%33%45+]]
 8348+!! result
 8349+<p><a href="https://www.mediawiki.org/index.php?title=User:%2B%25&amp;action=edit&amp;redlink=1" class="new" title="User:+% (page does not exist)">User:+%</a> <a href="https://www.mediawiki.org/index.php?title=Page%2Btitle%25&amp;action=edit&amp;redlink=1" class="new" title="Page+title% (page does not exist)">Page+title%</a>
 8350+<a href="https://www.mediawiki.org/index.php?title=%25%2B&amp;action=edit&amp;redlink=1" class="new" title="%+ (page does not exist)">%+</a> <a href="https://www.mediawiki.org/index.php?title=%25%2B&amp;action=edit&amp;redlink=1" class="new" title="%+ (page does not exist)">%20</a> <a href="https://www.mediawiki.org/index.php?title=%25%2B&amp;action=edit&amp;redlink=1" class="new" title="%+ (page does not exist)">%+ </a> <a href="https://www.mediawiki.org/index.php?title=%25%2Br&amp;action=edit&amp;redlink=1" class="new" title="%+r (page does not exist)">%+r</a>
 8351+<a href="https://www.mediawiki.org/index.php?title=%25&amp;action=edit&amp;redlink=1" class="new" title="% (page does not exist)">%</a> <a href="https://www.mediawiki.org/index.php?title=%2B&amp;action=edit&amp;redlink=1" class="new" title="+ (page does not exist)">+</a> <a href="https://www.mediawiki.org/index.php?title=Special:Upload&amp;wpDestFile=%25%2Babc9" class="new" title="File:%+abc9">bar</a>
 8352+<a href="https://www.mediawiki.org/index.php?title=3E&amp;action=edit&amp;redlink=1" class="new" title="3E (page does not exist)">3E</a> <a href="https://www.mediawiki.org/index.php?title=3E%2B&amp;action=edit&amp;redlink=1" class="new" title="3E+ (page does not exist)">3E+</a>
 8353+</p>
 8354+!! end
83318355
83328356 TODO:
83338357 more images

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78952(Bug 26410) In an internal link, a plus sign is treated as a space if the link ...bawolff09:53, 24 December 2010

Status & tagging log