From a0fd48e6ca90fd92ad9e0f5521c616cd01e43158 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sun, 24 Sep 2023 17:15:40 +0100 Subject: [PATCH] fix: encode tag for URI (WEB-1) The tag 'c#' was causing problems since # is a special URI char oops. --- OliverBooth/Pages/Blog/Index.cshtml | 2 +- src/ts/app.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OliverBooth/Pages/Blog/Index.cshtml b/OliverBooth/Pages/Blog/Index.cshtml index e6081d9..d558cdf 100644 --- a/OliverBooth/Pages/Blog/Index.cshtml +++ b/OliverBooth/Pages/Blog/Index.cshtml @@ -41,7 +41,7 @@ diff --git a/src/ts/app.ts b/src/ts/app.ts index 39ee1f5..1fa8193 100644 --- a/src/ts/app.ts +++ b/src/ts/app.ts @@ -28,6 +28,8 @@ declare const Prism: any; } }); + Handlebars.registerHelper("urlEncode", encodeURIComponent); + function getQueryVariable(variable: string): string { const query = window.location.search.substring(1); const vars = query.split("&");