See: https://github.com/babluboy/bookworm/pull/391

From 9128a392396b354fd8e265287b785996ee9a6a26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jeremy=20B=C3=ADcha?= <jeremy.bicha@canonical.com>
Date: Wed, 3 Jan 2024 17:02:54 -0500
Subject: [PATCH 1/3] Stop using libsoup2.4 directly

webkit2gtk 4.1 switches from libsoup2.4 to libsoup3
and distros don't want to build webkit2gtk 4.0 any more
---
 src/utils.vala  | 4 ++--
 src/window.vala | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/utils.vala b/src/utils.vala
index 3416da1d..20154bce 100644
--- a/src/utils.vala
+++ b/src/utils.vala
@@ -639,7 +639,7 @@ namespace BookwormApp.Utils {
 		}
 
 		public static string decodeHTMLChars(string inputString){
-			string outputString = Soup.URI.decode(inputString);
+			string outputString = GLib.Uri.unescape_string(inputString);
 			return outputString;
 		}
 
@@ -649,7 +649,7 @@ namespace BookwormApp.Utils {
 		}
 
 		public static string removeMarkUp(string inputString){
-			string outputString = Soup.URI.decode(inputString);
+			string outputString = GLib.Uri.unescape_string(inputString);
 			//replace the escape char for space present in HTML converted from PDF
 			outputString = outputString.replace("&#160;", " ").replace("#160;", " ").replace("&#160", " ");
 			return outputString;
diff --git a/src/window.vala b/src/window.vala
index 18b43a1c..3d08d915 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -448,7 +448,7 @@ public class BookwormApp.AppWindow {
                 WebKit.NavigationAction aNavAction = aNavDecision.get_navigation_action();
                 WebKit.URIRequest aURIReq = aNavAction.get_request ();
                 string url_clicked_on_webview = BookwormApp.Utils.decodeHTMLChars(aURIReq.get_uri().strip());
-                url_clicked_on_webview = Soup.URI.decode(url_clicked_on_webview);
+                url_clicked_on_webview = GLib.Uri.unescape_string(url_clicked_on_webview);
                 debug("URL Captured:"+url_clicked_on_webview);
 
                 //Handle external links (not file://) by opening the default browser i.e. http://, ftp://

From 03f49ce4c47ca77237d614ced0a0d11898e517b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jeremy=20B=C3=ADcha?= <jeremy.bicha@canonical.com>
Date: Fri, 5 Jan 2024 18:11:34 -0500
Subject: [PATCH 2/3] Switch from webkit2gtk 4.0 to 4.1

Closes: https://github.com/babluboy/bookworm/issues/387
---
 README.md   | 5 ++---
 meson.build | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 0079de31..b592ed04 100644
diff --git a/meson.build b/meson.build
index 3708ed5a..43ee66e6 100644
--- a/meson.build
+++ b/meson.build
@@ -62,7 +62,7 @@ executable(
     dependencies: [
         dependency('gtk+-3.0'),
         dependency('gee-0.8'),
-        dependency('webkit2gtk-4.0'),
+        dependency('webkit2gtk-4.1'),
         dependency('poppler-glib'),
         dependency('libxml-2.0'),
         dependency('granite', version: '>=0.5'),
