mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Use encodeURIComponent instead of btoa
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/772
This commit is contained in:
parent
53304dbbc1
commit
ec5191004c
3 changed files with 3 additions and 3 deletions
|
|
@ -35,7 +35,7 @@ let details = {};
|
|||
{
|
||||
const matches = /details=([^&]+)/.exec(window.location.search);
|
||||
if ( matches !== null ) {
|
||||
details = JSON.parse(atob(matches[1]));
|
||||
details = JSON.parse(decodeURIComponent(matches[1]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@
|
|||
if ( targetURL.startsWith(vAPI.getURL('document-blocked.html')) ) {
|
||||
const matches = /details=([^&]+)/.exec(targetURL);
|
||||
if ( matches !== null ) {
|
||||
targetURL = JSON.parse(atob(matches[1])).url;
|
||||
targetURL = JSON.parse(decodeURIComponent(matches[1])).url;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ const onBeforeRootFrameRequest = function(fctxt) {
|
|||
if ( logData === undefined ) { return; }
|
||||
|
||||
// Blocked
|
||||
const query = btoa(JSON.stringify({
|
||||
const query = encodeURIComponent(JSON.stringify({
|
||||
url: requestURL,
|
||||
hn: requestHostname,
|
||||
dn: fctxt.getDomain() || requestHostname,
|
||||
|
|
|
|||
Loading…
Reference in a new issue