Do not encode '~' as %7E. Fixes redirect loop in chrome.
authorBrian Wolff <bawolff+wn@gmail.com>
Thu, 9 Jul 2015 05:19:35 +0000 (23:19 -0600)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 9 Jul 2015 10:52:24 +0000 (11:52 +0100)
commit7b4df0e12e36332fc2b303d7dac2295f8d36c888
treeaff1871908ca4b5b5ebb8dc8837938d294f9b172
parentba00a957fb44501725fd0b148efc5919b6c75785
Do not encode '~' as %7E. Fixes redirect loop in chrome.

As of 155d555b83eca640, we now redirect variations on hex escapes
into their canonical form. This was causing '~' to be redirected
to %7E. However google chrome seems to canonicalize %7E back
into ~, causing a redirect loop.

RFC 3986 says ~ is unreserved, so not hex encoding it should be
fine. To quote: "For consistency, percent-encoded octets in the
ranges of...tilde (%7E) should not be created by URI producers"

Bug: T105265
Change-Id: I01556eee496e2fb540de8ff09c082c1fedddb5f7
includes/GlobalFunctions.php
resources/src/mediawiki/mediawiki.util.js
tests/parser/parserTests.txt
tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php
tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js