Page MenuHomePhabricator

retrievedfrom text: also URI encode "(" and ")"
Open, LowPublicFeature

Description

In Skin.php, at
/** @return string Retrievied from HTML text */
function printSource() {

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

you need to make sure "(" and ")" are presented as %28 and %29,
because e.g., often users clicking on
http://en.wikipedia.org/wiki/Roselle_(plant)
will not be able to get to the link, as only
http://en.wikipedia.org/wiki/Roselle_%28plant%29
will work, when having the link sent to them by a friend and clicking
on it in their (mainstream MicroSoft) mail program (Outlook?).
http://en.wikipedia.org/wiki/Percent-encoding is over my head. All I know is that
when I send my friends ( and ) in URLs via plain text (not HTML) email,
they can't read the pages via clicking unless I manually change them to %'s.
Note, to see the above function's output, be sure stylesheets are
disabled in your browser, or use a text browser.
Anyway, you already encode CJK chars., so ugly is OK. Might as well encode
( and ), as the goal of the game is a guaranteed click (and not saying if
their client program is correct or not.)
See also bug 10206.


Version: 1.16.x
Severity: enhancement
URL: http://en.wikipedia.org/wiki/Roselle_(plant)

Details

Reference
bz21615

Event Timeline

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

And Ha Ha Ha... proof:
Notice how bugzilla, when turning the above links into clickable links,
has dropped the final ")"... therefore there is no denying that
you fellows printing ) instead of %29 is .... not helping!

I'm not so sure we should over-urlencode stuff and make URLs more obscure just because some clients are broken. Most clients are more tolerant if you wrap the URL in <>, like http://en.wikipedia.org/wiki/Roselle_(plant)

I see. So perhaps the URL should be prewrapped right there in the output:
Retrievied from: <http:... >

But it didn't help anyway, as you can see what happened to what you typed above!

(In reply to comment #3)

I see. So perhaps the URL should be prewrapped right there in the output:
Retrievied from: <http:... >

But it didn't help anyway, as you can see what happened to what you typed
above!

It helps in some clients, not all. It does help in my IRC client (ChatZilla). I'm not for wrapping it in brackets either. The senders of such e-mails, and especially the receivers, have brains and can IMO reasonably be expected to copypaste the entire link if their client cuts it off. Suggest WONTFIX.

So its OK to turn Chinese into %go%bb%ly%go%ok but parentheses are not
to be touched, even though the average proof above, plus my Mom (b. 1931) says she can't click on them
successfully... (a normal, not a computer brained person)... when the
whole point is to give something that is a sure fire link...

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM
Aklapper removed a subscriber: wikibugs-l-list.