From 600382c4884de19ee427423f1069ea932e30c58f Mon Sep 17 00:00:00 2001 From: qsniyg Date: Mon, 11 Nov 2024 00:43:41 +0000 Subject: [PATCH] Fix double encoded URLs for washington post --- src/userscript.ts | 5 ++++- userscript.user.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/userscript.ts b/src/userscript.ts index 1f1305c8..c6533e3d 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -31267,9 +31267,12 @@ var $$IMU_EXPORT$$; // thanks to llacb47 on github: https://github.com/qsniyg/maxurl/issues/482 (moving this rule above the /rf/ one due to [?#].*) // https://img.washingtonpost.com/wp-apps/imrs.php?src=https://www.washingtonpost.com/rf/image_982w/2010-2019/WashingtonPost/2020/03/14/Health-Environment-Science/Graphics/promo2-coronavirus-simulator-0313.jpg&w=60&h=60 // https://www.washingtonpost.com/rw/2010-2019/WashingtonPost/2020/03/14/Health-Environment-Science/Graphics/promo2-coronavirus-simulator-0313.jpg + // thanks to liamengland1 on github: https://github.com/qsniyg/maxurl/pull/1380 + // https://www.washingtonpost.com/wp-apps/imrs.php?src=https%3A%2F%2Farc-anglerfish-washpost-prod-washpost%252Es3%252Eamazonaws%252Ecom%2Fpublic%2FBJVONBA3VBXPZDXZILSARTNYY4%252Ejpg&w=992&h=662 + // https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/BJVONBA3VBXPZDXZILSARTNYY4.jpg newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+wp-apps\/+imrs\.php\?(?:.*&)?src=([^&]+).*/, "$1"); if (newsrc !== src) - return decodeuri_ifneeded(newsrc); + return decodeURIComponent(decodeuri_ifneeded(newsrc)); // thumbor (todo: have a sort of get_dest_from_thumbor in common_functions) // thanks to llacb47 on github: https://github.com/qsniyg/maxurl/issues/482 diff --git a/userscript.user.js b/userscript.user.js index ba7aefce..15ab1a9d 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -28592,9 +28592,12 @@ var $$IMU_EXPORT$$; // thanks to llacb47 on github: https://github.com/qsniyg/maxurl/issues/482 (moving this rule above the /rf/ one due to [?#].*) // https://img.washingtonpost.com/wp-apps/imrs.php?src=https://www.washingtonpost.com/rf/image_982w/2010-2019/WashingtonPost/2020/03/14/Health-Environment-Science/Graphics/promo2-coronavirus-simulator-0313.jpg&w=60&h=60 // https://www.washingtonpost.com/rw/2010-2019/WashingtonPost/2020/03/14/Health-Environment-Science/Graphics/promo2-coronavirus-simulator-0313.jpg + // thanks to liamengland1 on github: https://github.com/qsniyg/maxurl/pull/1380 + // https://www.washingtonpost.com/wp-apps/imrs.php?src=https%3A%2F%2Farc-anglerfish-washpost-prod-washpost%252Es3%252Eamazonaws%252Ecom%2Fpublic%2FBJVONBA3VBXPZDXZILSARTNYY4%252Ejpg&w=992&h=662 + // https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/BJVONBA3VBXPZDXZILSARTNYY4.jpg newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+wp-apps\/+imrs\.php\?(?:.*&)?src=([^&]+).*/, "$1"); if (newsrc !== src) - return decodeuri_ifneeded(newsrc); + return decodeURIComponent(decodeuri_ifneeded(newsrc)); // thumbor (todo: have a sort of get_dest_from_thumbor in common_functions) // thanks to llacb47 on github: https://github.com/qsniyg/maxurl/issues/482 // https://www.washingtonpost.com/resizer/5i6h3byfAbADvdFUAn-5RMklGQ4=/1200x630/filters:focal(2231x1260:4531x2559):quality(100)/arc-anglerfish-washpost-prod-washpost/public/JBWJ3HR4RQI6VL7CBEHLG63AWE.jpg