On redirects update the URL to that of the target page with JavaScript
Redirects to sections will now update the URL in browser's address bar
using the HTML5 History API. When [[Dog]] redirects to [[Animals#Dog]],
the user will now see "Animals#Dog" in their browser instead of "Dog#Dog".
The target URL is generated server-side to avoid pulling in dependencies
in the client-side RL module, which is loaded in the top queue.
Browsers that do not support the History API are still supported, the
way they always were.
Given the following three pages:
* A: #REDIRECT [[C]]
* B: #REDIRECT [[C#Section]]
* C: ==Section== \n ==Other section== \n
The following links should behave as follows:
* A → C
* B → C#Section
* A#Other_section → C#Other_section
* B#Other_section → C#Other_section
The code also supports forwarding query parameters like 'debug=1'.
Bug: 35045
Bug: 39328
Change-Id: I9d8d834762e19b836b7e35122b6c4cef0f91b7f0