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
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
The WMF core features team tracks this bug on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/363, 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?
Example link taken from the workshop notes:
http://ee-flow.wmflabs.org/w/index.php?title=Talk:Flow_workshop&workflow=0506fc4aad826e5b09a3fa163e68c4ac&action=view#flow-post-0506fd0ed2010e132562fa163e68c4ac
So might be old and fixed now.
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.
Also middle-clicking on "Older topics" (to open in a new tab) gives this: http://ee-flow.wmflabs.org/w/index.php?title=Special:Flow/Sandbox&topic_list[offset-id]=050805974f590e132562fa163e68c4ac&topic_list[offset-dir]=fwd&topic_list[limit]=5&workflow=0503c3d2e3d2ad56ca39fa163e68c4ac&action=view
And for reference, the 'fixed' version of quidditys example url is:
This is basically urlencode( 'topic_list[offset-dir]' ) which returns 'topic_list%5Boffset-dir%5D'
Another group of unescaped brackets, found in all "comment" links in history pages, eg.
leads to
(I'm not sure if these additional examples help, or if they'll all be automagically fixed via a single change somewhere? Let me know :)
Another fresh example. This is causing problems.
https://www.mediawiki.org/w/index.php?title=Talk:Sandbox&workflow=050defb4e07513ccf17190b11c2d680e#flow-post-050df155089fcfb51c0e782bcb016050
(Also, the mingle card needs to be re-opened, but I cannot change the "Accepted" status: https://wikimedia.mingle.thoughtworks.com/projects/flow/cards/363
(In reply to comment #9)
Another group of unescaped brackets, found in all "comment" links in history
pages, eg.http://ee-flow.wmflabs.org/w/index.php?title=User_talk:
Quiddity&workflow=0506915cf3d0b62ef835fa163e68c4ac&action=topic-history
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: https://www.mediawiki.org/w/index.php?title=Talk:Flow&topic[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
For the record, this was also reported at
https://www.mediawiki.org/w/index.php?title=Thread:Extension_talk:Scribunto/Framework_for_interactive_applications_on-wiki/reply_(2)&diff=898156
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