Page MenuHomePhabricator

Print version displays URL-encoded link
Closed, DeclinedPublic


Author: riddari

When printing out the page above I noticed that the footer text (displayed above the category listings) says ''Af ""'' instead of ''AfÁrni''.

The URL becomes rather unsightly and confusing to type in for anyone who will follow up on it.

Version: 1.11.x
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:54 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz10206.
bzimport added a subscriber: Unknown Object (MLST).

avarab wrote:

I don't think it's a good idea to change this as you suggest. When a user prints out an article they should be given a link back to the original article that will work everywhere.

To take an example let's say the user was using a browser which sent the request over latin-1 encoded, i.e.:

Árni =

as opposed to:

Árni =

That specific case would only work because we speficically fall back on latin-1. However if the user read the unencoded url and sent the request over in a browser that was using something other than latin-1 or utf-8 he would be out of luck.

Of course this is pretty much a non-issue for languages such as Icelandic that fall neatly within latin-1, but it's a real issue for languages like japanese that have multiple encodings in use. Then there's also the UI problem of requiring users to type non-standard and non-ascii URIs to get to the article in question.

It might be a good idea to also include an unencoded URI on the printed page, but there should always be an encoded one that's guarenteed to work everywhere.

This is the Skin.php code that passes the argument to the retrievedfrom message in question:

$url = htmlspecialchars( $wgTitle->getFullURL() );
return wfMsg( 'retrievedfrom', '<a href="'.$url.'">'.$url.'</a>' );

riddari wrote:

So make it an option which can be turned on for the wiki in question.

ayg wrote:

It doesn't make much sense as a per-wiki option. Providing both would make sense, but that would be kind of ugly.

I could swear that there's another bug on this.

riddari wrote:

Couldn't find a similar bug before I posted it. As for the url-encoded uri the browsers allready print it out in the header of the printouts, what is lacking is the human readable one which MediaWiki should provide.

By making it a per-wiki option we ensure that if it is unsuitable for say the Japanese one, it is suitable for Icelandic one, which incidentally has no article with a non-latin name at the moment as far as I can see.

dyrfjord wrote:

This could also be made an option for users instead of whole projects or languages. If I want a printout with human readable URIs then I could just check a box on my options page for example.

Change severity to enhancement, as this isn't a bug.

Hmm, I think there's some overlap between this and bug 3575, bug 16428, and bug 16659. Should sort them out maybe?

Mainframe98 edited projects, added MediaWiki-User-Interface; removed MediaWiki-Parser.
Mainframe98 edited subscribers, added: Mainframe98; removed: wikibugs-l-list.

Viewing the printable version (which is deprecated: T167956), the "Retrieved from" message doesn't appear to be URL-encoded anymore.