Last modified: 2012-11-21 02:15:12 UTC
Testcase: [[a?b]] [[a?b|c]]
Do you expect the question mark to be percent-encoded? I guess browsers are free to use percent encoding for anything vaguely dangerous (and are also free to percent-decode HTML href attributes), so it is probably up to the server implementation to handle the fun a?b?action=edit case properly by splitting on the last question mark. Could be wrong though, did not investigate this very deeply.
(In reply to comment #1) > Do you expect the question mark to be percent-encoded? I guess browsers are > free to use percent encoding for anything vaguely dangerous (and are also free > to percent-decode HTML href attributes), so it is probably up to the server > implementation to handle the fun a?b?action=edit case properly by splitting on > the last question mark. Could be wrong though, did not investigate this very > deeply. Nope. Path and query are two different parts in URL, and always split by the first question mark as defined in RFC. See http://tools.ietf.org/html/rfc3986#section-3.3
Ok, then that means that browers only decode percent-encoded question marks for display purposes, and don't percent-encode bare question marks. We'll percent-encode the question marks in the title then.
Fixed with https://gerrit.wikimedia.org/r/34471.