base commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
/** Минимальное экранирование для безопасного HTML из пользовательского ввода. */
|
||||
export function escapeHtml(input) {
|
||||
return String(input ?? '')
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
}
|
||||
Reference in New Issue
Block a user