Page MenuHomePhabricator

Flow: Remove square brackets ("[" and "]") from Flow-related URLs
Closed, ResolvedPublic


Don't use square brackets in urls - many email programs and IRC programs will break the link, and wikis will incorrectly interpret it. (Also avoid round brackets, and quotation marks, if possible)


Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz56196.
bzimport added a subscriber: Unknown Object (MLST).

The WMF core features team tracks this bug on Mingle card, but people from the community are welcome to contribute here and in Gerrit.

Unable to reproduce.

I looked at a few URLs displayed in the interface, and they're all escaped correctly.

Where did you get this link?

S, care to elaborate?

Andrew and S can't reproduce, so closed in Mingle, and here.

ErikB says square brackets are the way that MediaWiki can pass array arguments in URLs, that's a good reason to use them.

Reopening; S, you reproduced an example of this kind of URL in bug #56300 ;p

(In reply to comment #9)

Another group of unescaped brackets, found in all "comment" links in history
pages, eg.

If I View > Source of that page, or select "added a comment" and View > Selection Source, I see %5B and %5D in the HTML, not square brackets.

(In reply to comment #10)

Also in diffs, eg

Again, if you View > Source the URLs of the "history page" and "20 days ago" links contain %5B and %5D, not brackets.

Note that when you mouse over these, and when you copy and paste them, your browser shows you '[' and ']' in place of the %5B and %5D -- try it with the URL in comment #8 -- so it's hard to tell what's going on. View > Source.

(In reply to comment #11)
That seems like a bug. The hyperlink ends at the square brackets. I don't know if Flow should be escaping URLs before submitting to Parsoid or if Parsoid is doing something wrong.

Another example:[postId]=050f90d90ce1662828ca90b11c28d444&workflow=050f6a5c16971e9b25a890b11c27a364

Please do not use [ and ] in the URL. This breaks wikimarkup (try making an external link with the URL above in it) and is just generally ugly and bad. The use of [ and ] in URLs is definitely a valid bug.

Change 110501 had a related patch set uploaded by EBernhardson:
Switch to underscores, because php mangles everything else

Change 110501 merged by jenkins-bot:
Switch to underscores, because php mangles everything else

This fix on ee-flow is causing problems in mini-pencil > Show changes links, see bug 60947

Links with topic[postId] in their URL are still present in Special:RecentChanges, specifically its "full-date" and "|post)" links. E.g.

The issue might lie in postLink() and postHistoryLink() in includes/Formatter/AbstractFormatter.php, which pass

'topic' => array( 'postId'

to UrlGenerator->buildUrl , maybe they should call generateBlockUrl() and a version that permits a particular action

Change 120732 had a related patch set uploaded by Bsitu:
Remove [] from URL

Change 120732 merged by jenkins-bot:
Remove [] from URL

Quiddity removed a subscriber: Maryana.Dec 19 2014, 1:39 AM