[polari/wip/fmuellner/xdg-app: 1/3] utils: Always linkify http/https schemas



commit a13f777a086ce521eeb3fd8ac6e47356cbc6813c
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Feb 20 17:05:40 2016 +0100

    utils: Always linkify http/https schemas
    
    When running sandboxed, we might not have access to schema handlers
    or the list of installed applications to determine which schemas are
    supported. We won't be able to actually open links in that case, but
    we assume that we can open URLs without schema (as http://), so it
    makes sense to also always linkify http:// URLs with schema. At least
    users can copy the URL and paste it into their browser ...

 src/utils.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/utils.js b/src/utils.js
index 2c63918..8fb89e6 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -49,7 +49,7 @@ const IMGUR_CLIENT_ID = '4109e59177ec95e';
 const _balancedParens = '\\((?:[^\\s()<>]+|(?:\\(?:[^\\s()<>]+\\)))*\\)';
 const _leadingJunk = '[\\s`(\\[{\'\\"<\u00AB\u201C\u2018]';
 const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u201C\u201D\u2018\u2019]';
-const _uriList = getURISchemes();
+const _uriList = getURISchemes() || ['http','https'];
 
 const _urlRegexp = new RegExp(
     '(^|' + _leadingJunk + ')' +


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