From bec647412fd13f4c5a312328985a47593aa3f351 Mon Sep 17 00:00:00 2001 From: Princi Vershwal Date: Tue, 2 Jul 2024 21:13:32 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20url=20decoding=20issue?= =?UTF-8?q?=20-=20=20URLs=20sent=20in=20emails=20containing=20a=20%=20can?= =?UTF-8?q?=20now=20be=20updated(#20518)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes https://linear.app/tryghost/issue/ENG-447/🐛-urls-sent-in-emails-containing-a-percent-can-not-be-updated URLs were decoded before making a search query to the db. This is the reason the `%2F` character gets converted to `/`. This decoding is not required. --- ghost/link-tracking/lib/LinkClickTrackingService.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/ghost/link-tracking/lib/LinkClickTrackingService.js b/ghost/link-tracking/lib/LinkClickTrackingService.js index 0c0e746e04..9b63729f10 100644 --- a/ghost/link-tracking/lib/LinkClickTrackingService.js +++ b/ghost/link-tracking/lib/LinkClickTrackingService.js @@ -105,9 +105,6 @@ class LinkClickTrackingService { * @throws {errors.BadRequestError} */ #parseLinkFilter(filter) { - // decode filter to manage any encoded uri components - filter = decodeURIComponent(filter); - try { const filterJson = nql(filter).parse(); const postId = filterJson?.$and?.[0]?.post_id;