mediawiki.RegExp (deprecated) -> mediawiki.util

Bug: T218339
Change-Id: I6913330609c03a0418af2ab54aa31f27a52dc6d0
This commit is contained in:
Timo Tijhof 2019-09-09 18:35:03 +01:00 committed by Fomafix
parent f7baa81b17
commit 6e4afbf3bb
2 changed files with 3 additions and 4 deletions

View file

@ -70,7 +70,7 @@
if ( mwUri.query.title ) {
// True if input starts with wgScriptPath.
regExp = new RegExp( '^' + mw.RegExp.escape( mw.config.get( 'wgScriptPath' ) ) + '/' );
regExp = new RegExp( '^' + mw.util.escapeRegExp( mw.config.get( 'wgScriptPath' ) ) + '/' );
// URL has a nonempty `title` query parameter like `/w/index.php?title=Foo`. The script
// path should match.
@ -84,7 +84,7 @@
} else {
// True if input starts with wgArticlePath and ends with a nonempty page title. The
// first matching group (index 1) is the page title.
regExp = new RegExp( '^' + mw.RegExp.escape( mw.config.get( 'wgArticlePath' ) ).replace( '\\$1', '(.+)' ) );
regExp = new RegExp( '^' + mw.util.escapeRegExp( mw.config.get( 'wgArticlePath' ) ).replace( '\\$1', '(.+)' ) );
// No title query parameter is present so the URL may be "pretty" like `/wiki/Foo`.
// `Uri.path` should not contain query parameters or a fragment, as is assumed in

View file

@ -16,7 +16,7 @@
"url": "https://www.mediawiki.org/wiki/Skin:MinervaNeue",
"license-name": "GPL-2.0-or-later",
"requires": {
"MediaWiki": ">= 1.32.0",
"MediaWiki": ">= 1.34.0",
"extensions": {
"MobileFrontend": ">= 2.1.0"
}
@ -520,7 +520,6 @@
"skins.minerva.icons.images.scripts",
"mediawiki.util",
"mediawiki.router",
"mediawiki.RegExp",
"mediawiki.Title",
"mediawiki.Uri",
"mobile.startup",