(trunk, web) #5620 'Inspector - Clickable urls in Comment field' -- added with patch by e-moe, thanks also to cfpp2p for testing

This commit is contained in:
Jordan Lee 2014-04-15 21:30:38 +00:00
parent e02b244300
commit 157bbe73f6
1 changed files with 8 additions and 1 deletions

View File

@ -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, '<a href="' + str + '" target="_blank" >' + str + '</a>');
}
else
setTextContent(e.comment_lb, str);
//
// origin