From 55d3072697ce3e764de4ceff712bc0bdf4cb7a45 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Sun, 21 Jan 2018 15:41:30 +0100 Subject: [PATCH] mediawiki.special.upload: Show an error message on "|" This change prevents that "|" is interpreted as title separator and shows the following message when the title contains a "|" character: The requested page title contains invalid characters: "|". Before this change the following message is shown on this case: The requested page title is empty or contains only the name of a namespace. Change-Id: If67ed573ea0b5c28c59a7d90e8581c4b67528450 --- resources/src/mediawiki.special/mediawiki.special.upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index 9bf62558dd..c46d2e69c2 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -71,7 +71,7 @@ formatversion: 2, action: 'query', // If title is empty, user input is invalid, the API call will produce details about why - titles: title ? title.getPrefixedText() : this.nameToCheck, + titles: [ title ? title.getPrefixedText() : this.nameToCheck ], prop: 'imageinfo', iiprop: 'uploadwarning', errorformat: 'html', -- 2.20.1