Page MenuHomePhabricator

Rendering URL datatype as wikitext should generate an external link instead of a bare URL
Closed, ResolvedPublic

Description

Repro:

  1. Go to MediaWiki
  2. Write "{{#property:P856}}xx" in page text

Actual:

  1. A link to http://www.mediawiki.org/wiki/MediaWikixx is generated (rendered from wikitext "http://www.mediawiki.org/wiki/MediaWikixx")

Expected:

  1. A link to http://www.mediawiki.org/wiki/MediaWiki is generated, followed by "xx" which is not a part of the link (rendered from wikitext "[http://www.mediawiki.org/wiki/MediaWiki http://www.mediawiki.org/wiki/MediaWiki]xx")

Details

Reference
bz56763

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:18 AM
bzimport set Reference to bz56763.
bzimport added a subscriber: Unknown Object (MLST).
liangent created this task.Nov 8 2013, 7:27 AM
brion added a comment.Nov 8 2013, 5:31 PM

Does [{{#property:P856}} whatever label you want on the link] work? This might be more flexible.

(In reply to comment #1)

Does [{{#property:P856}} whatever label you want on the link] work? This
might
be more flexible.

This fails when there're multiple statements for P856. See also my post in wikidata-l.

Can you please name a case where this is useful?

(In reply to comment #3)

Can you please name a case where this is useful?

Well rendering is already broken on any wiki where comma-separator is considered as a part of free-form URLs (IRIs?) by MediaWiki.

Please provide links and concrete examples of the issue.

(In reply to comment #5)

Please provide links and concrete examples of the issue.

https://zh-classical.wikipedia.org/wiki/User:Liangent/bug56763

The solution could be to make generated wikitext self-contained (ie. irrelevant from context). This is the point of this bug and that mail (to the list).

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lucie added a subscriber: Lucie.Dec 16 2014, 3:54 PM

Seems to be still an issue. But I'd be grateful, if someone else could also have a look on this.

Lucie removed a project: TestMe.Dec 16 2014, 3:54 PM
Lucie set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 23 2015, 5:17 PM
matej_suchanek updated the task description. (Show Details)
matej_suchanek removed a subscriber: Wikidata-bugs.
thiemowmde closed this task as Resolved.Oct 20 2016, 10:29 AM
thiemowmde assigned this task to hoo.
thiemowmde added a subscriber: thiemowmde.

With T142941 we are creating a new parser function that acts as requested. Because of T147307 we are wrapping the URL in a <span>. This sufficiently solves the problem described in this ticket.