mirror of https://github.com/gorhill/uBlock.git
Improve `set-cookie.fn` scriptlet
As per browser behavior, space character does not require encoding.
This commit is contained in:
parent
581c2824d0
commit
89fa666bc4
|
@ -977,7 +977,7 @@ function setCookieFn(
|
||||||
// https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1
|
// https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1
|
||||||
// The characters [",] are given a pass from the RFC requirements because
|
// The characters [",] are given a pass from the RFC requirements because
|
||||||
// apparently browsers do not follow the RFC to the letter.
|
// apparently browsers do not follow the RFC to the letter.
|
||||||
if ( /[^!-:<-[\]-~]/.test(value) ) {
|
if ( /[^ -:<-[\]-~]/.test(value) ) {
|
||||||
value = encodeURIComponent(value);
|
value = encodeURIComponent(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue