diff options
author | Kyle Kelley <rgbkrk@gmail.com> | 2013-06-12 12:31:38 -0500 |
---|---|---|
committer | Kyle Kelley <rgbkrk@gmail.com> | 2013-06-12 12:31:38 -0500 |
commit | 82de797642dbf18b93b8183466ec0494ca8dcb57 (patch) | |
tree | 0e5bfcc13d30b3a4e730dd1ca349285106e71c8a | |
parent | b4f155c02851de25a718684c4d2fbc99566c6117 (diff) | |
download | etherpad-lite-82de797642dbf18b93b8183466ec0494ca8dcb57.zip |
Only kept URL schemes which have an RFC standard
-rw-r--r-- | src/static/js/linestylefilter.js | 2 | ||||
-rw-r--r-- | src/static/js/pad_utils.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/static/js/linestylefilter.js b/src/static/js/linestylefilter.js index af3d09d9..dc807885 100644 --- a/src/static/js/linestylefilter.js +++ b/src/static/js/linestylefilter.js @@ -260,7 +260,7 @@ linestylefilter.getRegexpFilter = function(regExp, tag) linestylefilter.REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/; linestylefilter.REGEX_URLCHAR = new RegExp('(' + /[-:@a-zA-Z0-9_.,~%+\/\\?=&#!;()$]/.source + '|' + linestylefilter.REGEX_WORDCHAR.source + ')'); -linestylefilter.REGEX_URL = new RegExp(/(?:(?:https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|txmt):\/\/|mailto:|www\.)/.source + linestylefilter.REGEX_URLCHAR.source + '*(?![:.,;])' + linestylefilter.REGEX_URLCHAR.source, 'g'); +linestylefilter.REGEX_URL = new RegExp(/(?:(?:https?|s?ftp|ftps|file|nfs):\/\/|mailto:|www\.)/.source + linestylefilter.REGEX_URLCHAR.source + '*(?![:.,;])' + linestylefilter.REGEX_URLCHAR.source, 'g'); linestylefilter.getURLFilter = linestylefilter.getRegexpFilter( linestylefilter.REGEX_URL, 'url'); diff --git a/src/static/js/pad_utils.js b/src/static/js/pad_utils.js index 07e7463a..50525e0c 100644 --- a/src/static/js/pad_utils.js +++ b/src/static/js/pad_utils.js @@ -176,7 +176,7 @@ var padutils = { // copied from ACE var _REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/; var _REGEX_URLCHAR = new RegExp('(' + /[-:@a-zA-Z0-9_.,~%+\/?=&#;()$]/.source + '|' + _REGEX_WORDCHAR.source + ')'); - var _REGEX_URL = new RegExp(/(?:(?:https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|txmt):\/\/|mailto:)/.source + _REGEX_URLCHAR.source + '*(?![:.,;])' + _REGEX_URLCHAR.source, 'g'); + var _REGEX_URL = new RegExp(/(?:(?:https?|s?ftp|ftps|file|nfs):\/\/|mailto:)/.source + _REGEX_URLCHAR.source + '*(?![:.,;])' + _REGEX_URLCHAR.source, 'g'); // returns null if no URLs, or [[startIndex1, url1], [startIndex2, url2], ...] |