From 234b064a2916737dfa812def24bc1c33de9e12f4 Mon Sep 17 00:00:00 2001 From: Richard Bloor Date: Wed, 7 Aug 2024 15:08:51 +1200 Subject: [PATCH] runtime.getURL fixes post merge feedback --- .../mozilla/add-ons/webextensions/api/runtime/geturl/index.md | 2 +- files/en-us/mozilla/firefox/releases/130/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/mozilla/add-ons/webextensions/api/runtime/geturl/index.md b/files/en-us/mozilla/add-ons/webextensions/api/runtime/geturl/index.md index 04a6db380460e38..126bd46b441b195 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/runtime/geturl/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/runtime/geturl/index.md @@ -26,7 +26,7 @@ browser.runtime.getURL( ### Return value -`string`. The fully-qualified URL to the resource. For example, `moz-extension://e15cdd35-f9b7-4786-a39d-7d801bd2709e/help/open-in-container.html`. +`string`. The fully-qualified URL to the resource within the extension. ## Browser compatibility diff --git a/files/en-us/mozilla/firefox/releases/130/index.md b/files/en-us/mozilla/firefox/releases/130/index.md index b3f02ed2d849e01..52a5151d3fcd377 100644 --- a/files/en-us/mozilla/firefox/releases/130/index.md +++ b/files/en-us/mozilla/firefox/releases/130/index.md @@ -58,7 +58,7 @@ This article provides information about the changes in Firefox 130 that affect d ## Changes for add-on developers -- {{WebExtAPIRef("runtime.getURL")}} (and the deprecated {{WebExtAPIRef("extension.getURL")}}) have been updated to prefix the supplied path string with the extension's `moz-extension:` origin (in line with the behavior of Chrome). In addition, {{WebExtAPIRef("runtime.getURL")}} no longer strips `/.`, `./`, and `../.` strings from the input URL ([Firefox bug 1795082](https://bugzil.la/1795082)). +- {{WebExtAPIRef("runtime.getURL")}} (and the deprecated {{WebExtAPIRef("extension.getURL")}}) now always prepended the extension origin to the path, without further normalization. Previously, when an absolute URL was provided, instead of a relatively URL, the absolute URL was returned. ([Firefox bug 1795082](https://bugzil.la/1795082)). ### Removals