Skip to content

Commit

Permalink
fix: encode URLs in json samples linkify (xss)
Browse files Browse the repository at this point in the history
thanks to @masatokinugawa
  • Loading branch information
RomanHotsiy committed Apr 27, 2020
1 parent ffa216e commit 62c01da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/jsonToHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function valueToHTML(value, maxExpandLevel: number) {
output +=
decorateWithSpan('"', 'token string') +
'<a href="' +
value +
encodeURI(value) +
'">' +
htmlEncode(stringifyStringLiteral(value)) +
'</a>' +
Expand Down

0 comments on commit 62c01da

Please sign in to comment.