Last modified: 2012-10-15 13:54:01 UTC
At the moment all links that end in ".pdf" seem to get the PDF icon. This is OK for links to external sites, but MediaWiki ought to be smart enough to use the correct icon when linking to elsewhere on the same wiki.
Thus a link like http://en.wikipedia.org/w/index.php?title=Special:Log&page=File:4chan_raid.pdf should not be rendered with a PDF icon.
Why shouldn't it? It's a PDF file and it's not formatted as an internal link.
(In reply to comment #1)
> Why shouldn't it? It's a PDF file and it's not formatted as an internal link.
In fact it is *not* PDF file but XHTML - it doesn't point to PDF file itself, but to the log page of that file. It should have the standard "arrow-out" icon then.
This is a tricky thing to deal with -- you can't *actually* tell from a URL what the file type is going to be. :)
In theory a better selector could distinguish between the whole URL and the path before the query string ending in ".pdf", but I'm not sure how convenient that is... and it'll still give you false matches in cases like a link to a File: page.
(In reply to comment #3)
> This is a tricky thing to deal with -- you can't *actually* tell from a URL
> what the file type is going to be. :)
Yeah... a true solution to this would probably be a way to link to internal pages without using the external link syntax (which I'm sure has already been requested elsewhere). This just caught my attention at one point.