aboutsummaryrefslogtreecommitdiff
path: root/src/lib/utils.ts
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-02-17 00:19:51 -0600
committermat <github@matdoes.dev>2022-02-17 00:19:51 -0600
commita6cff35351d418272d137013cd536c26e978b6f6 (patch)
tree6df48609fe09c844e5874bdd94f4e01f113703c9 /src/lib/utils.ts
parentcd982e64595ab47a5fa71a40f8249893dbf867df (diff)
downloadskyblock-stats-a6cff35351d418272d137013cd536c26e978b6f6.tar.gz
skyblock-stats-a6cff35351d418272d137013cd536c26e978b6f6.tar.bz2
skyblock-stats-a6cff35351d418272d137013cd536c26e978b6f6.zip
move some stuff and change how constants are done
Diffstat (limited to 'src/lib/utils.ts')
-rw-r--r--src/lib/utils.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index c2a955a..ae0c5f0 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -61,7 +61,8 @@ export function formattingCodeToHtml(formatted: string): string {
reset()
}
} else {
- htmlOutput += character
+ // no xss!
+ htmlOutput += character.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
}
}
reset()