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




commit 7cb7ed54932589797c59c5162790477362974f68
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]