From 87f7f4804ef4e3e2eba908109953724c5e411c87 Mon Sep 17 00:00:00 2001
From: Adam Laycock <adam.laycock@gmail.com>
Date: Thu, 27 Nov 2025 22:51:56 +0000
Subject: [PATCH] Prevent double-loading of afterDOMReady scripts (#2213)

---
 quartz/util/escape.ts |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/quartz/util/escape.ts b/quartz/util/escape.ts
index 197558c..ac59cc7 100644
--- a/quartz/util/escape.ts
+++ b/quartz/util/escape.ts
@@ -6,3 +6,12 @@
     .replaceAll('"', "&quot;")
     .replaceAll("'", "&#039;")
 }
+
+export const unescapeHTML = (html: string) => {
+  return html
+    .replaceAll("&amp;", "&")
+    .replaceAll("&lt;", "<")
+    .replaceAll("&gt;", ">")
+    .replaceAll("&quot;", '"')
+    .replaceAll("&#039;", "'")
+}

--
Gitblit v1.10.0