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 Medium.Nov 22 2014, 2:18 AM
bzimport set Reference to bz56763.
bzimport added a subscriber: Unknown Object (MLST).

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).

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

Lucie set Security to None.
matej_suchanek updated the task description. (Show Details)
matej_suchanek removed a subscriber: Wikidata-bugs.
thiemowmde assigned this task to hoo.
thiemowmde subscribed.

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.