mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-17 02:10:39 +03:00
fix: encode URLs in json samples linkify (xss)
thanks to @masatokinugawa
This commit is contained in:
parent
ffa216ea87
commit
62c01da420
|
@ -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>' +
|
||||||
|
|
Loading…
Reference in New Issue
Block a user