From 157bbe73f6e6792c21f27c32cb841081ca8a16c1 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Tue, 15 Apr 2014 21:30:38 +0000 Subject: [PATCH] (trunk, web) #5620 'Inspector - Clickable urls in Comment field' -- added with patch by e-moe, thanks also to cfpp2p for testing --- web/javascript/inspector.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/javascript/inspector.js b/web/javascript/inspector.js index d53b53400..ab226f843 100644 --- a/web/javascript/inspector.js +++ b/web/javascript/inspector.js @@ -106,6 +106,7 @@ function Inspector(controller) { creator, mixed_creator, date, mixed_date, v, u, f, d, pct, + uri, now = Date.now(); // @@ -396,7 +397,13 @@ function Inspector(controller) { } if(!str) str = none; - setTextContent(e.comment_lb, str); + uri = parseUri(str); + if (uri.protocol == 'http' || uri.parseUri == 'https') { + str = encodeURI(str); + setInnerHTML(e.comment_lb, '' + str + ''); + } + else + setTextContent(e.comment_lb, str); // // origin -- 2.40.0