init: init commit, build

This commit is contained in:
Oyasuminasai
2025-12-29 14:13:38 +08:00
commit 455cabe243
207 changed files with 39618 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;", "'")
}