Page MenuHomePhabricator

Phabricator provides some URLS with square brackets in them, which break MediaWiki's parsing of external links
Closed, ResolvedPublic

Description

Fixed upstream.


Example: We can't link to http://fab.wmflabs.org/maniphest/?statuses[]=0&allProjects[]=PHID-PROJ-lykw342rrq42z6t2osbf#R on a MediaWiki page. There are probably workarounds like URL encoding, but it's not super easy for casual wiki users.

Details

Reference
fl88

Event Timeline

flimport raised the priority of this task from to Low.Sep 12 2014, 1:24 AM
flimport set Reference to fl88.

qgil wrote on 2014-04-14 17:11:13 (UTC)

Do you know which type of URLs are the ones generating square brackets?

For what is worth, some Bugzilla queries also had this problem, although they were seldom. I remember having to escape them manually in order to go through MediaWiki parser..

epriestley wrote on 2014-04-25 18:38:17 (UTC)

We generally support more human-friendly versions of these URLs, and can do a pass through the codebase and swap them at some point if you want to file something in the upstream. For example, ?statuses[]=open&statuses[]=closed can be written with an equivalent, human-friendlier format: ?statuses=open,closed. Not sure if commas also break stuff, though.

parent5446 wrote on 2014-05-10 14:53:57 (UTC)

I feel like this is more of a MediaWiki bug than it is Phabricator. Having brackets in URLs is completely legal, and in fact is a feature of PHP.

epriestley wrote on 2014-05-10 15:18:10 (UTC)

Here's a pending fix in the upstream:

https://secure.phabricator.com/D9042

The effect is just that we'll no longer generate these URIs in the UI. They'll still work, and we may generate them in the future, but in all the places we currently generate them it was trivial to use a more human-friendly alternate construction and get a better result for everyone.

parent5446 wrote on 2014-05-10 17:52:18 (UTC)

That's cool. But nonetheless, for MediaWiki in general, there may be other products or websites that will not be as easy to workaround as Phabricator. The fact that MediaWiki does not work correctly with brackets in URLs is a problem.

epriestley wrote on 2014-05-10 18:39:04 (UTC)

Sure, definitely. That might not be easy to fix, though. :)

The upstream patch is in HEAD now so I think the Phabricator portion of this should be resolved, in any case:

https://secure.phabricator.com/rPb64415c9