1
0
Fork 0

[utils] fix: Also replace & in user strings

This commit is contained in:
joostdecock 2025-05-01 17:43:23 +02:00 committed by Joost De Cock
parent d267c04286
commit 415a6559d3

View file

@ -72,6 +72,7 @@ export function clone(obj) {
*/
export function escapeSvgText(text) {
return String(text)
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')