User "Catrope" posted a comment on MediaWiki.r94502. Full URL: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/94502#c20810 Commit summary:
(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 Comment: Good point. I'll just use two caching vars. I was aware that the actual indices wouldn't be booleans, but hadn't really thought about the implications when mixing with non-boolean indices. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
