Merge "reinstating Change Ifb1f6125..."
[lhc/web/wiklou.git] / resources / mediawiki / mediawiki.Title.js
index 6b6e586..33cca58 100644 (file)
        }
 
 var
+       /**
+        * Public methods (defined later)
+        */
+       fn,
+
        /**
         * Strip some illegal chars: control chars, colon, less than, greater than,
         * brackets, braces, pipe, whitespace and normal spaces. This still leaves some insanity
@@ -127,7 +132,7 @@ var
        setAll = function ( title, s ) {
                // In normal browsers the match-array contains null/undefined if there's no match,
                // IE returns an empty string.
-               var     matches = s.match( /^(?:([^:]+):)?(.*?)(?:\.(\w{1,5}))?$/ ),
+               var matches = s.match( /^(?:([^:]+):)?(.*?)(?:\.(\w+))?$/ ),
                        ns_match = getNsIdByName( matches[1] );
 
                // Namespace must be valid, and title must be a non-empty string.
@@ -155,7 +160,7 @@ var
        setNameAndExtension = function ( title, raw ) {
                // In normal browsers the match-array contains null/undefined if there's no match,
                // IE returns an empty string.
-               var matches = raw.match( /^(?:)?(.*?)(?:\.(\w{1,5}))?$/ );
+               var matches = raw.match( /^(?:)?(.*?)(?:\.(\w+))?$/ );
 
                // Title must be a non-empty string.
                if ( typeof matches[1] === 'string' && matches[1] !== '' ) {
@@ -221,7 +226,7 @@ var
 
        /* Public methods */
 
-       var fn = {
+       fn = {
                constructor: Title,
 
                /**