fix: escape single quotes in U.esc to prevent onclick attribute injection
This commit is contained in:
@@ -22,7 +22,7 @@ const U = {
|
|||||||
|
|
||||||
esc(s) {
|
esc(s) {
|
||||||
if (!s) return '';
|
if (!s) return '';
|
||||||
return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"');
|
return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''');
|
||||||
},
|
},
|
||||||
|
|
||||||
showAlert(containerId, type, msg) {
|
showAlert(containerId, type, msg) {
|
||||||
|
|||||||
Reference in New Issue
Block a user