Last modified: 2005-12-28 23:17:37 UTC
Using action=render on a page that links to a special page (e.g. [[Special:Allpages]]) results in a weird link in the output (see URL): obviously the link is parsed twice, as two html link-tags are visible. Cause: this bug arises from the special treatment of links to Specialpages in combination with the full links (incl $wgServerUrl) in the href-attribute. Unlike normal links, those to special pages are not replaced by a linkholder but inserted directly (via Skin::makeKnownLinkObj). With $action == 'render' links are inserted with $wgServerUrl (which is useful). After this parsing of the internal links the external links are parsed. The value in the href-attribute is now considered as a free external link and replaced with a new link-tag of class 'external free'. Solution: ?, perhaps the regex '/(\b(?:'.$wgUrlProtocols.'))/S' in Parser:replaceExternalLinks could be adjusted?
This also occurs for [[:Image:xxx]] links, for the same reason. This could probably be fixed by replacing makeKnownLinkObj() with makeLinkHolder(), as is done with interwiki links.
There's also the dummy links used for commons images and links inside captions, using UNIQ_PREFIX."NOPARSE" [That should probably happen in a function, btw, so it can be changed in one place, without risk of doom]. Don't know what the advantages and disadvantages of using each in these cases are.
(In reply to comment #1) not really a duplicate, but please compare bug 2726 regarding broken image links from the Commons
*** This bug has been marked as a duplicate of 3397 ***