Wikimedia

Support fragments in MediaWiki's mw.util.getUrl()

See https://phabricator.wikimedia.org/T103553

Currently mw.util.getUrl() in MediaWiki's core codebase does not support fragments.

mw.util.getUrl( 'Title Ä#Fragment Ä', { useskin: 'vector' } ) evaluates to /wiki/Title_%C3%84%23Fragment_%C3%84?useskin=vector.

Expected result: /wiki/Title_%C3%84?useskin=vector#Fragment_.C3.84

Your patch should include unit tests confirming the correct behavior.

Task tags

  • javascript

Students who completed this task

unicornisaurous

Task type

  • code Code
close

2015