[gnome-maps/wip/mlundblad/libsoup3: 8/11] osmUtils: Use GLib.uri_unescape_string()




commit 2ae054d6902a17eb5a2baa390f4c9f0fa87bce50
Author: Marcus Lundblad <ml dfupdate se>
Date:   Wed Aug 17 22:01:33 2022 +0200

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

 src/osmUtils.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/osmUtils.js b/src/osmUtils.js
index 5b8f8315..fd245a76 100644
--- a/src/osmUtils.js
+++ b/src/osmUtils.js
@@ -20,7 +20,7 @@
  * Author: Marcus Lundblad <ml update uu se>
  */
 
-import Soup from 'gi://Soup';
+import GLib from 'gi://GLib';
 
 import {Application} from './application.js';
 
@@ -36,7 +36,8 @@ export function getWikipediaOSMArticleFormatFromUrl(url) {
         let lang = match[1];
         let article = match[2];
 
-        return lang + ':' + Soup.uri_decode(article).replace(/_/g, ' ');
+        return lang + ':' +
+               GLib.uri_unescape_string(article, null).replace(/_/g, ' ');
     } else {
         return null;
     }


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