Work around instances of over-encoded subscription URLs

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/763#issuecomment-691696716
This commit is contained in:
Raymond Hill 2020-09-13 13:41:25 -04:00
parent 066f06745b
commit 714f07dc25
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ const onMaybeSubscriptionLinkClicked = function(ev) {
const subscribeURL = new URL('about:blank'); const subscribeURL = new URL('about:blank');
try { try {
subscribeURL.href = target.href; // https://github.com/uBlockOrigin/uBlock-issues/issues/763#issuecomment-691696716
// Remove replacement patch if/when filterlists.com fixes encoded '&'.
subscribeURL.href = target.href.replace('&', '&');
if ( if (
/^(abp|ubo):$/.test(subscribeURL.protocol) === false && /^(abp|ubo):$/.test(subscribeURL.protocol) === false &&
subscribeURL.hostname !== 'subscribe.adblockplus.org' subscribeURL.hostname !== 'subscribe.adblockplus.org'