(bug 30269) Strings like foobar//barfoo are linked to become foobar[//barfoo]
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 15 Aug 2011 12:20:00 +0000 (12:20 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 15 Aug 2011 12:20:00 +0000 (12:20 +0000)
commit48bbe8b848fd7021a0d32729b9c8c77038762fa1
treefa663c1d3de25971ef0932427573a399722ae992
parent4c56a0a38095a91e11cf4859ecb6ac17d1aabff8
(bug 30269) Strings like foobar//barfoo are linked to become foobar[//barfoo]

* Introduce a boolean parameter to wfUrlProtocols() which, if set to false, will cause '//' to be dropped from the returned regex so it doesn't match protocol-relative URLs
* Introduce wfUrlProtocolsWithoutProtRel() as a wrapper for wfUrlProtocols( false ). The latter should not be used directly because the former is much clearer
* Use this new function in Parser::doMagicLinks() to fix the original bug. Also use it in ApiFormatBase::formatHTML() and CodeCommentLinker::link(), which probably had similar bugs
includes/GlobalFunctions.php
includes/api/ApiFormatBase.php
includes/parser/Parser.php