Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -16,16 +16,16 @@ |
17 | 17 | array( 'src' => 'Modules/Preview/Preview.js', 'version' => 6 ), |
18 | 18 | array( 'src' => 'Modules/Publish/Publish.js', 'version' => 6 ), |
19 | 19 | array( 'src' => 'Modules/Toc/Toc.js', 'version' => 7 ), |
20 | | - array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 95 ), |
| 20 | + array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 96 ), |
21 | 21 | array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 6 ), |
22 | 22 | array( 'src' => 'Modules/Templates/Templates.js', 'version' => 1 ), |
23 | 23 | array( 'src' => 'Modules/AddMediaWizard/AddMediaWizard.js', 'version' => 6 ), |
24 | 24 | ), |
25 | 25 | 'combined' => array( |
26 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 102 ), |
| 26 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 103 ), |
27 | 27 | ), |
28 | 28 | 'minified' => array( |
29 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 102 ), |
| 29 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 103 ), |
30 | 30 | ), |
31 | 31 | ); |
32 | 32 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1046,15 +1046,13 @@ |
1047 | 1047 | // The following things are considered to be external links: |
1048 | 1048 | // * Starts a URL protocol |
1049 | 1049 | // * Starts with www. |
1050 | | - // * Ends with a . followed by two or more letters |
1051 | | - // * Contains a . followed by two or more letters followed by / |
1052 | | - // All of these are potentially valid titles, and the latter three |
| 1050 | + // All of these are potentially valid titles, and the latter two |
1053 | 1051 | // categories match about 6300 titles in enwiki's ns0. Out of 6.9M |
1054 | 1052 | // titles, that's 0.09% |
1055 | 1053 | if ( typeof arguments.callee.regex == 'undefined' ) { |
1056 | 1054 | // Cache the regex |
1057 | 1055 | arguments.callee.regex = |
1058 | | - new RegExp( "(^(" + wgUrlProtocols + "))|(^www\\.)|([^.]\\.[a-z]{2,}($|\\/))", 'i'); |
| 1056 | + new RegExp( "^(" + wgUrlProtocols + "|www\\.)", 'i'); |
1059 | 1057 | } |
1060 | 1058 | return s.match( arguments.callee.regex ); |
1061 | 1059 | } |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | <label for="wikieditor-toolbar-link-type-ext" rel="wikieditor-toolbar-tool-link-ext"></label>\ |
28 | 28 | </div>\ |
29 | 29 | </div>\ |
30 | | - </fieldset>',init:function(){function isExternalLink(s){if(typeof arguments.callee.regex=='undefined'){arguments.callee.regex=new RegExp("(^("+wgUrlProtocols+"))|(^www\\.)|([^.]\\.[a-z]{2,}($|\\/))",'i');} |
| 30 | + </fieldset>',init:function(){function isExternalLink(s){if(typeof arguments.callee.regex=='undefined'){arguments.callee.regex=new RegExp("^("+wgUrlProtocols+"|www\\.)",'i');} |
31 | 31 | return s.match(arguments.callee.regex);} |
32 | 32 | function updateWidget(status){$j('#wikieditor-toolbar-link-int-target-status').children().hide();$j('#wikieditor-toolbar-link-int-target').parent().removeClass('status-invalid status-external status-notexists status-exists status-loading');if(status){$j('#wikieditor-toolbar-link-int-target-status-'+status).show();$j('#wikieditor-toolbar-link-int-target').parent().addClass('status-'+status);} |
33 | 33 | if(status=='invalid'){$j('.ui-dialog:visible .ui-dialog-buttonpane button:first').attr('disabled',true).addClass('disabled');}else{$j('.ui-dialog:visible .ui-dialog-buttonpane button:first').removeAttr('disabled').removeClass('disabled');}} |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -997,15 +997,13 @@ |
998 | 998 | // The following things are considered to be external links: |
999 | 999 | // * Starts a URL protocol |
1000 | 1000 | // * Starts with www. |
1001 | | - // * Ends with a . followed by two or more letters |
1002 | | - // * Contains a . followed by two or more letters followed by / |
1003 | | - // All of these are potentially valid titles, and the latter three |
| 1001 | + // All of these are potentially valid titles, and the latter two |
1004 | 1002 | // categories match about 6300 titles in enwiki's ns0. Out of 6.9M |
1005 | 1003 | // titles, that's 0.09% |
1006 | 1004 | if ( typeof arguments.callee.regex == 'undefined' ) { |
1007 | 1005 | // Cache the regex |
1008 | 1006 | arguments.callee.regex = |
1009 | | - new RegExp( "(^(" + wgUrlProtocols + "))|(^www\\.)|([^.]\\.[a-z]{2,}($|\\/))", 'i'); |
| 1007 | + new RegExp( "^(" + wgUrlProtocols + "|www\\.)", 'i'); |
1010 | 1008 | } |
1011 | 1009 | return s.match( arguments.callee.regex ); |
1012 | 1010 | } |