Arlolra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/155865

Change subject: Title attributes for interwiki links
......................................................................

Title attributes for interwiki links

 * Follow up on 8cb75184d769966788065f1cc7e49bf6b7e647f4.

Change-Id: Id555f1b6e08930d3777d2d988e6d6819590c5c0c
---
M lib/ext.core.LinkHandler.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 44 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/65/155865/1

diff --git a/lib/ext.core.LinkHandler.js b/lib/ext.core.LinkHandler.js
index 77e4dda..4bbd461 100644
--- a/lib/ext.core.LinkHandler.js
+++ b/lib/ext.core.LinkHandler.js
@@ -15,15 +15,15 @@
        Sanitizer = sanitizerLib.Sanitizer,
        SanitizerConstants = sanitizerLib.SanitizerConstants,
        defines = require('./mediawiki.parser.defines.js'),
-       DU = require('./mediawiki.DOMUtils.js').DOMUtils;
+       DU = require('./mediawiki.DOMUtils.js').DOMUtils,
+       ImageInfoRequest = require( './mediawiki.ApiRequest.js' 
).ImageInfoRequest;
 
 // define some constructor shortcuts
 var KV = defines.KV,
-    EOFTk = defines.EOFTk,
-    TagTk = defines.TagTk,
-    SelfclosingTagTk = defines.SelfclosingTagTk,
-    EndTagTk = defines.EndTagTk,
-       ImageInfoRequest = require( './mediawiki.ApiRequest.js' 
).ImageInfoRequest;
+       EOFTk = defines.EOFTk,
+       TagTk = defines.TagTk,
+       SelfclosingTagTk = defines.SelfclosingTagTk,
+       EndTagTk = defines.EndTagTk;
 
 function WikiLinkHandler( manager, options ) {
        this.manager = manager;
@@ -98,6 +98,7 @@
                        if ( info.fromColonEscapedText || 
(interwikiInfo.language === undefined && interwikiInfo.extralanglink === 
undefined) ) {
                                // An interwiki link.
                                info.interwiki = interwikiInfo;
+                               info.title = new Title( Util.decodeURI( 
info.href ), 0, '', env );
                        } else {
                                // Bug #45209: Check it's not a prefix for the 
same wiki, in which
                                // case treat it like a normal internal link, 
not displaying the
@@ -238,8 +239,17 @@
  * target structure.
  */
 WikiLinkHandler.prototype.getWikiLinkHandler = function (token, target) {
-       var title = target.title;
-       if ( title ) {
+       if ( target.interwiki ) {
+               return this.renderInterwikiLink.bind(this);
+       } else if ( target.language ) {
+               return this.renderLanguageLink.bind(this);
+       } else {
+               var title = target.title;
+               if ( !title ) {
+                       this.manager.env.log("error", "Neither a title, nor a 
language" +
+                               " or interwiki. Should not happen.");
+                       return;
+               }
                if (!target.fromColonEscapedText) {
                        if (title.ns.isFile()) {
                                // Render as a file.
@@ -252,15 +262,7 @@
                // Colon-escaped or non-file/category links. Render as plain 
wiki
                // links.
                return this.renderWikiLink.bind(this);
-
-       // language and interwiki links
-       } else if (target.interwiki) {
-               return this.renderInterwikiLink.bind(this);
-       } else if (target.language) {
-               return this.renderLanguageLink.bind(this);
        }
-
-       // Neither a title, nor a language or interwiki. Should not happen.
 };
 
 /* ------------------------------------------------------------
@@ -522,9 +524,8 @@
  */
 WikiLinkHandler.prototype.renderInterwikiLink = function (token, frame, cb, 
target) {
        // The prefix is listed in the interwiki map
-
-       var tokens = [],
-               newTk = new TagTk('a', [], token.dataAttribs),
+       var newTk = new TagTk('a', [], token.dataAttribs),
+               tokens = [ newTk ],
                content = this.addLinkAttributesAndGetContent(newTk, token, 
target, true);
 
        // We set an absolute link to the article in the other wiki/language
@@ -534,23 +535,26 @@
        }
        newTk.addNormalizedAttribute('href', absHref, target.hrefSrc);
 
+       // Add title unless it's just a fragment
+       if ( target.href[0] !== "#" ) {
+               newTk.setAttribute( "title",
+                       target.interwiki.prefix + ":" + 
target.title.getPrefixedText() );
+       }
+
        // Change the rel to be mw:ExtLink
        Util.lookupKV( newTk.attribs, 'rel' ).v = 'mw:ExtLink';
+
        // Remember that this was using wikitext syntax though
        newTk.dataAttribs.isIW = true;
-
-       tokens.push( newTk );
 
        // If this is a simple link, include the prefix in the link text
        if (newTk.dataAttribs.stx === 'simple' && !newTk.dataAttribs.pipetrick) 
{
                content.unshift(target.prefix + ':');
        }
 
-       tokens = tokens.concat( content,
-                       [new EndTagTk( 'a' )] );
-       cb({tokens: tokens});
+       tokens = tokens.concat( content, [ new EndTagTk('a') ] );
+       cb({ tokens: tokens });
 };
-
 
 /**
  * Extract the dimensions for an image
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 4b89fbb..1670df5 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -61,10 +61,7 @@
 add("wt2html", "Broken image links with HTML captions (bug 39700)", "<meta 
typeof=\"mw:Placeholder\" 
data-parsoid='{\"src\":\"[[File:Nonexistent|&lt;script>&lt;/script>]]\",\"optList\":[{\"ck\":\"caption\",\"ak\":\"&lt;script>&lt;/script>\"}],\"dsr\":[0,38,null,null]}'/>\n<meta
 typeof=\"mw:Placeholder\" 
data-parsoid='{\"src\":\"[[File:Nonexistent|100px|&lt;script>&lt;/script>]]\",\"optList\":[{\"ck\":\"width\",\"ak\":\"100px\"},{\"ck\":\"caption\",\"ak\":\"&lt;script>&lt;/script>\"}],\"dsr\":[39,83,null,null]}'/>\n<meta
 typeof=\"mw:Placeholder\" 
data-parsoid='{\"src\":\"[[File:Nonexistent|&amp;lt;]]\",\"optList\":[{\"ck\":\"caption\",\"ak\":\"&amp;lt;\"}],\"dsr\":[84,109,null,null]}'/>\n<meta
 typeof=\"mw:Placeholder\" 
data-parsoid='{\"src\":\"[[File:Nonexistent|a&lt;i>b&lt;/i>c]]\",\"optList\":[{\"ck\":\"caption\",\"ak\":\"a&lt;i>b&lt;/i>c\"}],\"dsr\":[110,141,null,null]}'/>");
 add("wt2html", "Self-link to numeric title", "<p 
data-parsoid='{\"dsr\":[0,5,0,0]}'><a rel=\"mw:WikiLink\" href=\"./0\" 
title=\"0\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./0\"},\"sa\":{\"href\":\"0\"},\"dsr\":[0,5,2,2]}'>0</a></p>");
 add("wt2html", "<nowiki> inside a link", "<p 
data-parsoid='{\"dsr\":[0,96,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Main_Page\" 
title=\"Main Page\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main&lt;nowiki>
 Page&lt;/nowiki>\"},\"dsr\":[0,30,2,2]}'>Main Page</a> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page\" title=\"Main Page\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main
 Page\"},\"dsr\":[31,96,12,2]}'>the main page <span typeof=\"mw:Nowiki\" 
data-parsoid='{\"dsr\":[57,94,8,9]}'>[it's not very good]</span></a></p>");
-add("wt2html", "Inline interwiki link", "<p 
data-parsoid='{\"dsr\":[0,25,0,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity\"; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity\"},\"sa\":{\"href\":\"MeatBall:SoftSecurity\"},\"isIW\":true,\"dsr\":[0,25,2,2]}'>MeatBall:SoftSecurity</a></p>");
-add("wt2html", "Inline interwiki link with empty title (bug 2372)", "<p 
data-parsoid='{\"dsr\":[0,13,0,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?\"; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?\"},\"sa\":{\"href\":\"MeatBall:\"},\"isIW\":true,\"dsr\":[0,13,2,2]}'>MeatBall:</a></p>");
-add("wt2html", "Interwiki link encoding conversion (bug 1636)", "<ul 
data-parsoid='{\"dsr\":[0,64,0,0]}'><li data-parsoid='{\"dsr\":[0,32,1,0]}'><a 
rel=\"mw:ExtLink\" href=\"http://en.wikipedia.org/wiki/ro:Olteniţa\"; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://en.wikipedia.org/wiki/ro:Olteniţa\"},\"sa\":{\"href\":\"Wikipedia:ro:Olteni&amp;#0355;a\"},\"isIW\":true,\"dsr\":[1,32,2,2]}'>Wikipedia:ro:Olteniţa</a></li>\n<li
 data-parsoid='{\"dsr\":[33,64,1,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://en.wikipedia.org/wiki/ro:Olteniţa\"; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://en.wikipedia.org/wiki/ro:Olteniţa\"},\"sa\":{\"href\":\"Wikipedia:ro:Olteni&amp;#355;a\"},\"isIW\":true,\"dsr\":[34,64,2,2]}'>Wikipedia:ro:Olteniţa</a></li></ul>");
-add("wt2html", "Interwiki link with fragment (bug 2130)", "<p 
data-parsoid='{\"dsr\":[0,29,0,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo\"; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo\"},\"sa\":{\"href\":\"MeatBall:SoftSecurity#foo\"},\"isIW\":true,\"dsr\":[0,29,2,2]}'>MeatBall:SoftSecurity#foo</a></p>");
+add("wt2html", "Inline interwiki link with empty title (bug 2372)", "<p 
data-parsoid='{\"dsr\":[0,13,0,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?\"; title=\"meatball:\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?\"},\"sa\":{\"href\":\"MeatBall:\"},\"isIW\":true,\"dsr\":[0,13,2,2]}'>MeatBall:</a></p>");
 add("wt2html", "Local interwiki link", "<p 
data-parsoid='{\"dsr\":[0,22,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Local:Template:Foo\" title=\"Local:Template:Foo\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Local:Template:Foo\"},\"sa\":{\"href\":\"local:Template:Foo\"},\"dsr\":[0,22,2,2]}'>local:Template:Foo</a></p>");
 add("wt2html", "Local interwiki link: self-link to current page", "<p 
data-parsoid='{\"dsr\":[0,19,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Local:Main_Page\" title=\"Local:Main Page\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Local:Main_Page\"},\"sa\":{\"href\":\"local:Main
 Page\"},\"dsr\":[0,19,2,2]}'>local:Main Page</a></p>");
 add("wt2html", "Local interwiki link: prefix only (bug 64167)", "<p 
data-parsoid='{\"dsr\":[0,10,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Local:\" 
title=\"Local:\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Local:\"},\"sa\":{\"href\":\"local:\"},\"dsr\":[0,10,2,2]}'>local:</a></p>");
@@ -386,7 +383,6 @@
 add("wt2html", "Nesting tags, paragraphs on lines which begin with <div>", 
"<div data-parsoid='{\"stx\":\"html\",\"dsr\":[0,11,5,6]}'></div><strong 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[11,20,8,0]}'>A</strong>\n<p
 data-parsoid='{\"dsr\":[21,31,0,0]}'><strong 
data-parsoid='{\"stx\":\"html\",\"autoInsertedStart\":true,\"dsr\":[21,31,0,9]}'>B</strong></p>");
 add("wt2html", "Bug 6200: paragraphs inside blockquotes (no extra line 
breaks)", "<blockquote 
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,43,12,13]}'>Line one\n\nLine 
two</blockquote>");
 add("wt2html", "Bug 6200: paragraphs inside blockquotes (extra line break on 
close)", "<blockquote 
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,44,12,13]}'>Line one\n\n<p 
data-parsoid='{\"dsr\":[22,30,0,0]}'>Line two</p>\n</blockquote>");
-add("wt2html", "Interwiki links trounced by replaceExternalLinks after early 
LinkHolderArray expansion", "<p data-parsoid='{\"dsr\":[0,44,0,0]}'><a 
rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?1\"; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?1\"},\"sa\":{\"href\":\"meatball:1\"},\"isIW\":true,\"dsr\":[0,14,2,2]}'>meatball:1</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?2\"; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?2\"},\"sa\":{\"href\":\"meatball:2\"},\"isIW\":true,\"dsr\":[15,29,2,2]}'>meatball:2</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?3\"; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?3\"},\"sa\":{\"href\":\"meatball:3\"},\"isIW\":true,\"dsr\":[30,44,2,2]}'>meatball:3</a></p>");
 add("wt2html", "Free external link invading image caption", "<figure 
class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"bogus\",\"ak\":\"http://x\"},{\"ck\":\"caption\",\"ak\":\"hello\"}],\"dsr\":[0,41,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{},\"dsr\":[2,null,null,null]}'><img
 resource=\"./File:Foobar.jpg\" 
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" 
height=\"25\" width=\"220\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"Image:Foobar.jpg\"}}'/></a><figcaption
 data-parsoid='{\"dsr\":[null,39,null,null]}'>hello</figcaption></figure>");
 add("wt2html", "formatdate parser function", "<p about=\"#mwt1\" 
typeof=\"mw:Transclusion\" 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#formatdate:2009-03-24\",\"function\":\"#formatdate\"},\"params\":{},\"i\":0}}]}'
 data-parsoid='{\"dsr\":[0,26,0,0],\"pi\":[[]]}'>Parser function implementation 
for pf_#formatdate missing in Parsoid.</p>");
 add("wt2html", "formatdate parser function, with default format", "<p 
about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#formatdate:2009-03-24\",\"function\":\"#formatdate\"},\"params\":{\"1\":{\"wt\":\"mdy\"}},\"i\":0}}]}'
 
data-parsoid='{\"dsr\":[0,30,0,0],\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]]}'>Parser
 function implementation for pf_#formatdate missing in Parsoid.</p>");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index cda40b6..c611a83 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -4006,8 +4006,8 @@
 </p>
 !! html/parsoid
 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo";></a></p>
-<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo";>Bar</a></p>
-<p><a rel="mw:ExtLink" 
href="http://en.wikipedia.org/wiki/Foo";><span>Bar</span></a></p>
+<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"; 
title="wikipedia:Foo">Bar</a></p>
+<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"; 
title="wikipedia:Foo"><span>Bar</span></a></p>
 !! end
 
 !! test
@@ -6663,19 +6663,19 @@
 
 [[  wikiPEdia :Foo]]
 !! html/parsoid
-<p><a rel="mw:ExtLink" href="//en.wikipedia.org/wiki/Foo" 
data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}'>en:Foo</a></p>
+<p><a rel="mw:ExtLink" href="//en.wikipedia.org/wiki/Foo" title="en:Foo" 
data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}'>en:Foo</a></p>
 
-<p><a rel="mw:ExtLink" href="//en.wikipedia.org/wiki/Foo" 
data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}'>Foo</a></p>
+<p><a rel="mw:ExtLink" href="//en.wikipedia.org/wiki/Foo" title="en:Foo" 
data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}'>Foo</a></p>
 
-<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}'>wikipedia:Foo</a></p>
+<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"; 
title="wikipedia:Foo" 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}'>wikipedia:Foo</a></p>
 
-<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}'>Foo</a></p>
+<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"; 
title="wikipedia:Foo" 
data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}'>Foo</a></p>
 
-<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}'>wikipedia:en:Foo</a></p>
+<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo"; 
title="wikipedia:en:Foo" 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}'>wikipedia:en:Foo</a></p>
 
-<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}'>wikipedia:en:Foo</a></p>
+<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo"; 
title="wikipedia:en:Foo" 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}'>wikipedia:en:Foo</a></p>
 
-<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":";
  wikiPEdia :Foo"},"isIW":true}'>  wikiPEdia :Foo</a></p>
+<p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"; 
title="wikipedia:Foo" 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":";
  wikiPEdia :Foo"},"isIW":true}'>  wikiPEdia :Foo</a></p>
 !! end
 
 !! test
@@ -6688,9 +6688,9 @@
 [http://de.wikipedia.org/wiki/#foo is just fragment]
 
 !! html/parsoid
-<p><a rel="mw:ExtLink" 
href="http://www.usemod.com/cgi-bin/mb.pl?ok";>meatball:ok</a>
-<a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo";>ok with 
fragment</a>
-<a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?";>ok 
ending with ? mark</a>
+<p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok"; 
title="meatball:ok">meatball:ok</a>
+<a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo"; 
title="meatball:ok">ok with fragment</a>
+<a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?"; 
title="meatball:ok as well?">ok ending with ? mark</a>
 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history";>has 
query</a>
 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo";>is just 
fragment</a></p>
 !! end
@@ -6702,7 +6702,7 @@
 !! wikitext
 [[wikipedia:Foo|Ba]]r
 !! html
-<p data-parsoid='{}'><a rel="mw:ExtLink" 
href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}'>Bar</a></p>
+<p data-parsoid='{}'><a rel="mw:ExtLink" 
href="http://en.wikipedia.org/wiki/Foo"; title="wikipedia:Foo" 
data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}'>Bar</a></p>
 !! end
 
 !! test
@@ -6906,7 +6906,7 @@
 !! wikitext
 [[:ko:]]
 !! html
-<p><a rel="mw:ExtLink" href="//ko.wikipedia.org/wiki/">ko:</a></p>
+<p><a rel="mw:ExtLink" href="//ko.wikipedia.org/wiki/" title="ko:">ko:</a></p>
 !! end
 
 !! test

-- 
To view, visit https://gerrit.wikimedia.org/r/155865
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id555f1b6e08930d3777d2d988e6d6819590c5c0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to