r92006 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92005‎ | r92006 | r92007 >
Date:20:56, 12 July 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
Parser tests for protocol-relative URLs, for r91663 and r92005
Modified paths:
  • /trunk/phase3/tests/parser/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/parser/parserTests.txt
@@ -715,6 +715,33 @@
716716 !!end
717717
718718 !! test
 719+External links: protocol-relative URL in brackets
 720+!! input
 721+[//example.com/ Test]
 722+!! result
 723+<p><a rel="nofollow" class="external text" href="https://www.mediawiki.org//example.com/">Test</a>
 724+</p>
 725+!! end
 726+
 727+!! test
 728+External links: protocol-relative URL in brackets without text
 729+!! input
 730+[//example.com]
 731+!! result
 732+<p><a rel="nofollow" class="external autonumber" href="https://www.mediawiki.org//example.com">[1]</a>
 733+</p>
 734+!! end
 735+
 736+!! test
 737+External links: protocol-relative URL in free text is left alone
 738+!! input
 739+//example.com/Foo
 740+!! result
 741+<p>//example.com/Foo
 742+</p>
 743+!!end
 744+
 745+!! test
719746 External image
720747 !! input
721748 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png

Sign-offs

UserFlagDate
😂tested21:07, 12 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91663(bug 29497) To support protocol-relative URLs in external links, add '//' to ...catrope18:26, 7 July 2011
r92005Fix r14202 (!!): this validates the protocol against the regex for the second...catrope20:55, 12 July 2011

Comments

#Comment by 😂 (talk | contribs)   21:07, 12 July 2011

Tests pass for me :D

Status & tagging log