[gnome-maps/wip/mlundblad/fix-sendto] sendToDialog: Use GLib.uri_escape_string()




commit f3a532bb92233580bafb7c6684d68d61e6aa51e2
Author: Marcus Lundblad <ml dfupdate se>
Date:   Thu Sep 22 21:33:36 2022 +0200

    sendToDialog: Use GLib.uri_escape_string()
    
    Change from libsoup's URI escape functionallity
    to using the one from GLib, as that API is removed
    in libsoup3.

 src/sendToDialog.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/sendToDialog.js b/src/sendToDialog.js
index caa4ae96..549d2f54 100644
--- a/src/sendToDialog.js
+++ b/src/sendToDialog.js
@@ -24,7 +24,6 @@ import GLib from 'gi://GLib';
 import GObject from 'gi://GObject';
 import Gtk from 'gi://Gtk';
 import GWeather from 'gi://GWeather';
-import Soup from 'gi://Soup';
 
 import {Application} from './application.js';
 import {PlaceFormatter} from './placeFormatter.js';
@@ -180,8 +179,8 @@ export class SendToDialog extends Gtk.Dialog {
     _emailSummary() {
         let title = new PlaceFormatter(this._place).title;
         let summary = "%s\n%s".format(this._getSummary(), this._getOSMURI());
-        let uri = 'mailto:?subject=%s&body=%s'.format(Soup.URI.encode(title, null),
-                                                      Soup.URI.encode(summary, null));
+        let uri = 'mailto:?subject=%s&body=%s'.format(GLib.uri_escape_string(title, null, false),
+                                                      GLib.uri_escape_string(summary, null, false));
 
         try {
           Gio.app_info_launch_default_for_uri(uri, this._getAppLaunchContext());


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]