[epiphany/pgriffis/web-extension/runtime-send-message: 9/15] WebExtensions: Fix runtime.getURL handling paths starting with /
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [epiphany/pgriffis/web-extension/runtime-send-message: 9/15] WebExtensions: Fix runtime.getURL handling paths starting with /
- Date: Thu,  2 Jun 2022 20:32:48 +0000 (UTC)
commit 2ae5e7dc11c90bd059c734715d7222f6464679e1
Author: Patrick Griffis <pgriffis igalia com>
Date:   Thu Jun 2 09:58:09 2022 -0500
    WebExtensions: Fix runtime.getURL handling paths starting with /
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1122>
 embed/web-process-extension/ephy-webextension-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/embed/web-process-extension/ephy-webextension-common.c 
b/embed/web-process-extension/ephy-webextension-common.c
index 89ef48d38..473ab9ccd 100644
--- a/embed/web-process-extension/ephy-webextension-common.c
+++ b/embed/web-process-extension/ephy-webextension-common.c
@@ -62,7 +62,7 @@ js_geturl (const char *path,
 {
   const char *guid = user_data;
 
-  return g_strdup_printf ("ephy-webextension://%s/%s", guid, path);
+  return g_strdup_printf ("ephy-webextension://%s/%s", guid, path[0] == '/' ? path + 1 : path);
 }
 
 static void
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]