Lol idek
This commit is contained in:
8 files changed
+269
-5
No files matched your search
+2
-2
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* HTML escape sequences for unsafe characters
|
||||
*/
|
||||
export const HTML_ESCAPES = {
|
||||
export const HTML_ESCAPES = {
|
||||
"&": "&",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
@@ -91,6 +91,6 @@ export function templateNoop(
|
||||
* @author MindfulMinun
|
||||
* @since 2020-06-23
|
||||
*/
|
||||
export function xss(unsafe: string): string {
|
||||
export function xss(unsafe: string): string {
|
||||
return unsafe.replace(/[&<>"'\/]/g, key => HTML_ESCAPES[key as keyof typeof HTML_ESCAPES])
|
||||
}
|
||||
Reference in new issue
Block a user