MCPcopy Index your code
hub / github.com/ClearURLs/Addon / decodeURL

Function decodeURL

core_js/tools.js:243–256  ·  view source on GitHub ↗

* Decodes an URL, also one that is encoded multiple times. * * @see https://stackoverflow.com/a/38265168 * * @param url the url, that should be decoded

(url)

Source from the content-addressed store, hash-verified

241 * @param url the url, that should be decoded
242 */
243function decodeURL(url) {
244 let rtn = decodeURIComponent(url);
245
246 while (isEncodedURI(rtn)) {
247 rtn = decodeURIComponent(rtn);
248 }
249
250 // Required (e.g., to fix https://github.com/ClearURLs/Addon/issues/71)
251 if (!rtn.startsWith('http')) {
252 rtn = 'http://' + rtn
253 }
254
255 return rtn;
256}
257
258/**
259 * Returns true, iff the given URI is encoded

Callers 1

removeFieldsFormURLFunction · 0.85

Calls 1

isEncodedURIFunction · 0.85

Tested by

no test coverage detected