init: init commit
All checks were successful
Build and Deploy Quartz / build-and-deploy (push) Has been skipped

This commit is contained in:
2026-01-01 14:16:34 +08:00
commit 4a5acab07d
216 changed files with 40383 additions and 0 deletions

17
quartz/util/escape.ts Normal file
View File

@@ -0,0 +1,17 @@
export const escapeHTML = (unsafe: string) => {
return unsafe
.replaceAll("&", "&")
.replaceAll("<", "&lt;")
.replaceAll(">", "&gt;")
.replaceAll('"', "&quot;")
.replaceAll("'", "&#039;")
}
export const unescapeHTML = (html: string) => {
return html
.replaceAll("&amp;", "&")
.replaceAll("&lt;", "<")
.replaceAll("&gt;", ">")
.replaceAll("&quot;", '"')
.replaceAll("&#039;", "'")
}