Steps to replicate the issue (include links if applicable):
- Open in VE: https://en.wikipedia.org/w/index.php?title=Climate_change_adaptation&oldid=1127022846
- Specifically a page with the partially percent-encoded anchor in the link: [[Millennium Development Goals#Controversy over funding of 0.7% of GNI|0.7% ODA target]]
- mw.Uri expects '%' to be percent-encoded
What happens?:
- VE startup crashes with a JS error URIError.
mw.utils.parsoid.js: mw.libs.ve.getTargetDataFromHref
if ( href.match( /^\.\// ) ) { // The specific case of parsoid resource URIs, which are in the form `./Title`. // If they're redlinks they now include a querystring which should be stripped. uri = new mw.Uri( href );
The mw.Uri fails with a URIError exception, after which VE stops loading, with no user feedback.
What should have happened instead?:
Editor should have given user feedback, as invalid anchors in wikitext are 'allowed'. Any new mw.Uri with untrusted user input (wikitext) should probably always be wrapped in a try/catch.
Software version (skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):