Fix invalid external link representation. 268 tests passing.

This commit is contained in:
Gabriel Wicke 2012-03-05 18:06:29 +00:00
parent da5a148f9c
commit 19fe9726a2
Notes: Gabriel Wicke 2012-03-05 18:06:29 +00:00
2 changed files with 3 additions and 1 deletions

View file

@ -270,7 +270,7 @@ ExternalLinkHandler.prototype.onExtLink = function ( token, manager, cb ) {
};
} else {
return {
tokens: ['[', href ].concat( content, [']'] )
tokens: ['[', href, ' ' ].concat( content, [']'] )
};
}
};

View file

@ -74,6 +74,8 @@ testWhiteList["Link containing % as a single hex sequence interpreted to char"]
testWhiteList["Link containing double-single-quotes '' (bug 4598)"] = "<p><a href=\"/wiki/Lista_d''e_paise_d''o_munno\" data-mw-type=\"internal\">Lista d''e paise d''o munno</a></p>";
testWhiteList["Brackets in urls"] = "<p><a href=\"http://example.com/index.php?foozoid[]=bar\">http://example.com/index.php?foozoid[]=bar</a></p><p><a href=\"http://example.com/index.php?foozoid[]=bar\">http://example.com/index.php?foozoid[]=bar</a></p>";
if (typeof module == "object") {
module.exports.testWhiteList = testWhiteList;
}