[epiphany/pgriffis/web-extension/runtime-send-message: 24/29] WebExtensions: Fix runtime.getURL handling paths starting with /




commit 4d3070a1bf5c9e2f9041f7d1b478580110d0436b
Author: Patrick Griffis <pgriffis igalia com>
Date:   Thu Jun 2 09:58:09 2022 -0500

    WebExtensions: Fix runtime.getURL handling paths starting with /

 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]