fix: linkify in json formatter

closes #267
This commit is contained in:
Roman Hotsiy 2017-05-24 10:24:37 +03:00
parent 3d1108f447
commit 899419269b
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -42,7 +42,7 @@ function valueToHTML(value) {
} else if (valueType === 'number') {
output += decorateWithSpan(value, 'type-number');
} else if (valueType === 'string') {
if (/^(http|https):\/\/[^\\s]+$/.test(value)) {
if (/^(http|https):\/\/[^\s]+$/.test(value)) {
output += decorateWithSpan('"', 'type-string') + '<a href="' + value + '">' + htmlEncode(value) + '</a>' +
decorateWithSpan('"', 'type-string');
} else {