Last modified: 2012-11-21 02:15:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43218, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41218 - Incorrect page is linked when page title contains a question mark
Incorrect page is linked when page title contains a question mark
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
token-stream transforms (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-19 16:26 UTC by Liangent
Modified: 2012-11-21 02:15 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Liangent 2012-10-19 16:26:21 UTC
Testcase:

[[a?b]]

[[a?b|c]]
Comment 1 Gabriel Wicke 2012-11-20 05:20:26 UTC
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.
Comment 2 Liangent 2012-11-20 05:50:25 UTC
(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
Comment 3 Gabriel Wicke 2012-11-20 05:55:59 UTC
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.
Comment 4 Gabriel Wicke 2012-11-21 02:15:12 UTC
Fixed with https://gerrit.wikimedia.org/r/34471.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links