[gnome-shell] findUrl: don't match non-:// URLs



commit 563221698c778fd38cf3ac77926b4875124864d9
Author: Dan Winship <danw gnome org>
Date:   Wed Apr 13 09:18:37 2011 -0400

    findUrl: don't match non-:// URLs
    
    Although "x:5" could theoretically be a URL with scheme "x" and path
    "5", it probably isn't. Only URLify strings that use the "authority"
    syntax ("foo://"). (No one ever types out "mailto:"; URLs in ordinary
    text, so we don't want to match those either.)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=636252

 js/misc/util.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/misc/util.js b/js/misc/util.js
index 7c14858..3ba2b7d 100644
--- a/js/misc/util.js
+++ b/js/misc/util.js
@@ -14,7 +14,7 @@ const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u201C\u201D\
 const _urlRegexp = new RegExp(
     '\\b(' +
         '(?:' +
-            '[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])' + // scheme:data
+            '[a-z][\\w-]+://' +                   // scheme://
             '|' +
             'www\\d{0,3}[.]' +                    // www.
             '|' +



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]