From c4ba9cc2baf2fb79323279203b4e1694100ecabe Mon Sep 17 00:00:00 2001
From: =?utf8?q?Paul=20H=C3=A4nsch?= <paul@plutz.net>
Date: Mon, 19 Jun 2023 15:25:13 +0200
Subject: [PATCH] Include backtick (`) in URL escape handling

---
 cgilite.sh   | 1 +
 markdown.awk | 1 +
 2 files changed, 2 insertions(+)

diff --git a/cgilite.sh b/cgilite.sh
index b915a8f..76c91b2 100755
--- a/cgilite.sh
+++ b/cgilite.sh
@@ -313,6 +313,7 @@ URL(){
     \&*) out="${out}%26"; str="${str#?}";;
     \"*) out="${out}%22"; str="${str#?}";;
     \'*) out="${out}%27"; str="${str#?}";;
+    \`*) out="${out}%60"; str="${str#?}";;
     \?*) out="${out}%3F"; str="${str#?}";;
     \#*) out="${out}%23"; str="${str#?}";;
     \[*) out="${out}%5B"; str="${str#?}";;
diff --git a/markdown.awk b/markdown.awk
index af3d722..a50f7a2 100755
--- a/markdown.awk
+++ b/markdown.awk
@@ -93,6 +93,7 @@ function URL ( text ) {
   gsub( /&/,  "%26",  text );
   gsub( /"/,  "%22", text );
   gsub( /'/,  "%27", text );
+  gsub( /`/,  "%60", text );
   gsub( /\?/,  "%3F", text );
   gsub( /#/,  "%23", text );
   gsub( /\[/,  "%5B", text );
-- 
2.39.5