Aleksander Machniak
2012-05-17 eebd4476fc9bba486068df1da5ef118e7a57439a
program/js/tiny_mce/plugins/autolink/editor_plugin_src.js
@@ -22,15 +22,15 @@
   init : function(ed, url) {
      var t = this;
      // Internet Explorer has built-in automatic linking
      if (tinyMCE.isIE)
         return;
      // Add a key down handler
      ed.onKeyDown.add(function(ed, e) {
      ed.onKeyDown.addToTop(function(ed, e) {
         if (e.keyCode == 13)
            return t.handleEnter(ed);
         });
      });
      // Internet Explorer has built-in automatic linking for most cases
      if (tinyMCE.isIE)
         return;
      ed.onKeyPress.add(function(ed, e) {
         if (e.which == 41)
@@ -125,11 +125,13 @@
         }
         text = r.toString();
         matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)(.+)$/i);
         matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|[A-Z0-9._%+-]+@)(.+)$/i);
         if (matches) {
            if (matches[1] == 'www.') {
               matches[1] = 'http://www.';
            } else if (/@$/.test(matches[1])) {
               matches[1] = 'mailto:' + matches[1];
            }
            bookmark = ed.selection.getBookmark();