|
|
@ -1,12 +1,15 @@
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
const escapeHtml = (unsafe: any): string => {
|
|
|
|
const escapeHtml = (unsafe: any): string => {
|
|
|
|
return unsafe
|
|
|
|
if (unsafe) {
|
|
|
|
.toString()
|
|
|
|
return unsafe
|
|
|
|
.replace(/&/g, '&')
|
|
|
|
.toString()
|
|
|
|
.replace(/</g, '<')
|
|
|
|
.replace(/&/g, '&')
|
|
|
|
.replace(/>/g, '>')
|
|
|
|
.replace(/</g, '<')
|
|
|
|
.replace(/"/g, '"')
|
|
|
|
.replace(/>/g, '>')
|
|
|
|
.replace(/'/g, ''');
|
|
|
|
.replace(/"/g, '"')
|
|
|
|
|
|
|
|
.replace(/'/g, ''');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return '';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
|
|