fix: encode URLs in json samples linkify (xss)

thanks to @masatokinugawa
This commit is contained in:
Roman Hotsiy 2020-04-27 19:47:29 +03:00
parent ffa216ea87
commit 62c01da420
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -56,7 +56,7 @@ function valueToHTML(value, maxExpandLevel: number) {
output += output +=
decorateWithSpan('"', 'token string') + decorateWithSpan('"', 'token string') +
'<a href="' + '<a href="' +
value + encodeURI(value) +
'">' + '">' +
htmlEncode(stringifyStringLiteral(value)) + htmlEncode(stringifyStringLiteral(value)) +
'</a>' + '</a>' +