diff --git a/toolkit/mozapps/extensions/src/nsAddonRepository.js b/toolkit/mozapps/extensions/src/nsAddonRepository.js index 0b17abbef60..fd1ad7d7ab5 100644 --- a/toolkit/mozapps/extensions/src/nsAddonRepository.js +++ b/toolkit/mozapps/extensions/src/nsAddonRepository.js @@ -51,7 +51,7 @@ const PREF_GETADDONS_GETSEARCHRESULTS = "extensions.getAddons.search.url"; const XMLURI_PARSE_ERROR = "http://www.mozilla.org/newlayout/xml/parsererror.xml"; -const API_VERSION = "1.1"; +const API_VERSION = "1.2"; function AddonSearchResult() { } @@ -172,7 +172,8 @@ AddonRepository.prototype = { var uri = prefs.getCharPref(PREF_GETADDONS_GETSEARCHRESULTS); uri = uri.replace(/%API_VERSION%/g, API_VERSION); - uri = uri.replace(/%TERMS%/g, encodeURIComponent(aSearchTerms)); + // We double encode due to bug 427155 + uri = uri.replace(/%TERMS%/g, encodeURIComponent(encodeURIComponent(aSearchTerms))); uri = urlf.formatURL(uri); this._loadList(uri); },