Page MenuHomePhabricator

interwikilink in comment is parsed wrong
Closed, DeclinedPublicFeature

Description

The link in the comment (url) is parsed wrong as:

[https://bugzilla.wikimedia.org/show_bug.cgi?id=18989 T20989: missing class definition of "visualClear" in modern skin]

The source is '[[bugzilla:18989|Bug 18989]]'


Version: unspecified
Severity: enhancement
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/51166#code-comments

Details

Reference
bz19299

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:43 PM
bzimport set Reference to bz19299.
bzimport added a subscriber: Unknown Object (MLST).

All [[x|...bug y...]] or [http://... ...bug x...] links have this problem too. The regexp doesn't check the context of "bug x" before replacing.

Happends to revision links aswell

http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75795#c10705
Source:
1 link
[http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75762#code-comments r75762 CR comments.]

Output:
3 links (opening of original, rev link, rest of original).

<a href="http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75762#code-comments" class="external text" rel="nofollow"></a><a href="/wiki/Special:Code/MediaWiki/75762" title="Special:Code/MediaWiki/75762">r75762</a><a href="http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75762#code-comments" class="external text" rel="nofollow"> CR comments</a>

Atleast the parser afterwards fixes to close the first one and not have a nested anchor tag.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM