r102699 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102698‎ | r102699 | r102700 >
Date:22:06, 10 November 2011
Author:neilk
Status:ok
Tags:
Comment:
log parsing errors, and ensure we can parse templates with names like "Cc-by-sa-3.0"
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mediawiki.language.parser.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js
@@ -484,6 +484,7 @@
485485 try {
486486 ast = parser.wikiTextToAst( text );
487487 } catch (e) {
 488+ mw.log( e.message );
488489 return false;
489490 }
490491
Index: trunk/extensions/UploadWizard/resources/mediawiki.language.parser.js
@@ -372,7 +372,9 @@
373373 }
374374
375375 var templateName = transform(
376 - makeRegexParser( /^[A-Za-z][\w -]+/ ),
 376+ // see $wgLegalTitleChars
 377+ // not allowing : due to the need to catch "PLURAL:$1"
 378+ makeRegexParser( /^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+-]+/ ),
377379 function( result ) { return result.toString(); }
378380 );
379381

Status & tagging log