Page MenuHomePhabricator

Page view parses text within square brackets as external links
Closed, ResolvedPublic

Description

Author: pinkampersand.wikimedia

Description:
See http://www.wikidata.org/w/index.php?title=Special:Translate&language=fr&group=page-Wikidata%3ANews&filter=&action=page: The text "edit [in English]" is rendered as "edit English", with "English" linking to http://www.wikidata.org/w/in. No actual issue on the rendered page, which is why I'm marking this as minor, but obviously MW should be consistent with what it parses as exlinks.


Version: unspecified
Severity: minor

Details

Reference
bz49850

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:09 AM
bzimport set Reference to bz49850.

Clarified the summary, it's only page view/page mode.

(In reply to comment #0)

but obviously MW should be consistent
with what it parses as exlinks.

Not obvious at all, e.g. edit summaries don't parse in the same way as pages and system messages all have different kind of parsing.

pinkampersand.wikimedia wrote:

Fair enough, I was overly broad. :P What I was getting at is that IMHO page view should parse potential exlinks the same way that normal wiki markup does. I.e. show it as an exlink if it starts with //, http://, https://, mailto:, irc://, etc., and don't show it as one if it starts with anything other than one of those predefined prefixes. Seems like the only surefire way to avoid false positives like this one.

Related URL: https://gerrit.wikimedia.org/r/69634 (Gerrit Change If7337cb1a9b729c511adb32d8a2326ea17a8160c)

Change 69634 merged by jenkins-bot:
Stricter parsing for external links in JavaScript

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