1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Fix the escapeAttribute function using HTML entities instead of backslash escapes (#6206)

* Fix the escapeAttribute function using HTML entities instead of backslash escapes

* Fix tests

---------

Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
Lety Does Stuff 2024-02-15 13:39:59 +00:00 committed by GitHub
parent ba3820965f
commit c4b039886e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -73,5 +73,5 @@ export function escapeHTML (stringParam: string) {
export function escapeAttribute (value: string) {
if (!value) return ''
return String(value).replace(/"/g, '\\"')
return String(value).replace(/"/g, '&quot;')
}