Last modified: 2011-08-12 13:34:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32236, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30236 - Protocol-relative URLs in double brackets parsed as internal links instead of external links surrounded by literal brackets
Protocol-relative URLs in double brackets parsed as internal links instead of...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.17.x
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 20342
  Show dependency treegraph
 
Reported: 2011-08-04 22:27 UTC by Derk-Jan Hartman
Modified: 2011-08-12 13:34 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
screenshot of problem (36.82 KB, image/png)
2011-08-04 22:27 UTC, Derk-Jan Hartman
Details

Description Derk-Jan Hartman 2011-08-04 22:27:52 UTC
Created attachment 8887 [details]
screenshot of problem

breakage in flaggedrevs due to upcoming switch to protocol relative uris

./presentation/language/FlaggedRevs.i18n.php:	'revreview-quick-basic'        => '\'\'\'[[{{MediaWiki:Validationpage}}|Checked]]\'\'\' [[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur{{MediaWiki:flaggedrevs-diffonly}}}} review pending changes]]',
./presentation/language/FlaggedRevs.i18n.php:	'revreview-quick-quality'      => '\'\'\'[[{{MediaWiki:Validationpage}}|Quality]]\'\'\' [[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur{{MediaWiki:flaggedrevs-diffonly}}}} review pending changes]]',
./presentation/language/FlaggedRevs.i18n.php:	'revreview-quick-see-basic'    => '[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur{{MediaWiki:flaggedrevs-diffonly}}}} review pending changes]]',
./presentation/language/FlaggedRevs.i18n.php:	'revreview-quick-see-quality'  => '[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur{{MediaWiki:flaggedrevs-diffonly}}}} review pending changes]]',
Comment 2 Hazard-SJ 2011-08-04 22:33:19 UTC
Possible reason: Test Wikipedia's server is set at "//test.wikipedia.org".
Comment 3 Roan Kattouw 2011-08-09 16:30:50 UTC
(In reply to comment #2)
> Possible reason: Test Wikipedia's server is set at "//test.wikipedia.org".
That's probably the reason, yes, but whatever FlaggedRevs is doing should account for $wgServer being protocol-relative. I suspect it's prepending $wgServer directly instead of using wfExpandUrl() properly.
Comment 4 Aaron Schulz 2011-08-09 16:32:23 UTC
FlaggedRevs is just using parser on some wikitext, see comment #1.
Comment 5 Krinkle 2011-08-09 16:40:18 UTC
So the problem is that wfExpandUrl is called for {{fullurl:}} calls, but it doesn't support relative urls yet.

Roan is working on that in trunk.
Comment 6 Roan Kattouw 2011-08-09 16:51:07 UTC
(In reply to comment #5)
> So the problem is that wfExpandUrl is called for {{fullurl:}} calls, but it
> doesn't support relative urls yet.
> 
> Roan is working on that in trunk.
No, that's not the problem, and it's not fixed in trunk.

{{fullurl:}} does, and MUST, output protocol-relative URLs to prevent cache pollution. And constructs like [//foo bar] work just fine. However, there is a difference between how the parser parses [[http://foo bar]] (literal [, external link, literal ]) and [[//foo bar]] (internal link).

I'll investigate this at some point this week. It probably needs to be fixed in the parser, and a new parser test.
Comment 7 Roan Kattouw 2011-08-12 13:34:08 UTC
Fixed in r94346.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links