rter.charset = charset; encodedParam = converter.ConvertFromUnicode(param) + converter.Finish(); } catch (ex) { encodedParam = param; } encodedParam = escape(encodedParam).replace( /[+@\/]+/g, encodeURIComponent ); } else { // Default charset is UTF-8 encodedParam = encodeURIComponent(param); } url = url.replace(/%s/g, encodedParam).replace(/%S/g, param); if (hasPOSTParam) { postData = decodedPostData .replace(/%s/g, encodedParam) .replace(/%S/g, param); } return [url, postData]; }, /** * Returns a set of parameters if a keyword is registered and the search * string can be bound to it. * * @param {string} keyword The typed keyword. * @param {string} searchString The full search string, including the keyword. * @returns { entry, url, postData } */ async getBindableKeyword(keyword, searchString) { let entry = await lazy.PlacesUtils.keywords.fetch(keyword); if (!entry) { return {}; } try { let [url, postData] = await this.parseUrlAndPostData( entry.url.href, entry.postData, searchString ); return { entry, url, postData }; } catch (ex) { return {}; } }, }; PK