Merge "Modify regex to allow section links as valid titles"

This commit is contained in:
jenkins-bot 2013-08-22 21:21:55 +00:00 committed by Gerrit Code Review
commit 3f7761d242

View file

@ -87,9 +87,13 @@ ve.ui.MWLinkInspector.prototype.getAnnotationFromText = function ( target ) {
/**
* Regular expression matching a valid internal link
*
* This is a slightly modified version of the PHP regex
* - unicode range changed from 0080-00ff to 0080-ffff
* - added '(#.*)?' to allow section links
*
* @type {RegExp}
*/
ve.ui.MWLinkInspector.static.legalTitle = /^[ %!"$&'()*,\-.\/0-9:;=?@A-Z\\^_`a-z~\u0080-\uFFFF+]+$/;
ve.ui.MWLinkInspector.static.legalTitle = /^[ %!"$&'()*,\-.\/0-9:;=?@A-Z\\^_`a-z~\u0080-\uFFFF+]+(#.*)?$/;
/* Registration */