fix: escape print-window fields and re-sanitize body to block XSS
This commit is contained in:
@@ -131,7 +131,7 @@ const HTML_ESCAPES: Record<string, string> = {
|
||||
"'": ''',
|
||||
};
|
||||
|
||||
function escapeHtml(str: string): string {
|
||||
export function escapeHtml(str: string): string {
|
||||
return str.replace(/[&<>"']/g, (c) => HTML_ESCAPES[c]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user