File: webkitgtk-4.1.patch

package info (click to toggle)
bookworm 1.1.2%2Bgit20210715-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,428 kB
  • sloc: python: 5,482; xml: 222; javascript: 84; sh: 16; makefile: 11
file content (61 lines) | stat: -rw-r--r-- 2,565 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From: =?utf-8?q?Jeremy_B=C3=ADcha?= <jeremy.bicha@canonical.com>
Date: Wed, 3 Jan 2024 17:02:54 -0500
Subject: Switch to webkitgtk 4.1

webkit2gtk 4.1 uses libsoup3 so stop using libsoup2.4

Forwarded: https://github.com/babluboy/bookworm/pull/391
---
 meson.build     | 2 +-
 src/utils.vala  | 4 ++--
 src/window.vala | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 3708ed5..43ee66e 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'),
diff --git a/src/utils.vala b/src/utils.vala
index 3416da1..20154bc 100644
--- a/src/utils.vala
+++ b/src/utils.vala
@@ -690,7 +690,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;
     }
 
@@ -700,7 +700,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 18b43a1..3d08d91 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -471,7 +471,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://
                 if (url_clicked_on_webview.index_of ("file://") == -1) {