I believe this behaviour should be reinstated.
- Mentioned Here
- rSVN103208: Make wfExpandUrl use wfRemoveDotSegments on the resulting path. This finishes
T34168: wfExpandUrl should expand ".." path segments
T39868: empty wgScriptPath make exporting to PDF fail
T40048: Root article paths allow creating local-like links to external sites (bypass nofollow, attacks Special:Random)
Declining this task. Expansion of relative urls seems problematic. Even if we could provide the document context reliably, there'd be too many ways to trigger code without a proper context (API, Maintenance scripts etc.). Relative paths need to be given to the browser as-is and used there, if meant to be relative.
If not meant to be relative, they need to be adjusted in the calling code before reaching wfExpandUrl(). For expansion between two internal paths, we do have Wikimedia\RelPath which may proof useful.