mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-10-10 05:36:01 +08:00
First decode tracking links, then strip query parameters
This commit is contained in:
parent
55bf83e02a
commit
261d9ba59c
1 changed files with 2 additions and 2 deletions
|
@ -20,8 +20,6 @@ const
|
|||
stripTracking = text => text
|
||||
.replace(/tracking\.(printabout\.nl[^?]+)\?.*/gsi, (...m) => m[1])
|
||||
.replace(/^.+awstrack\.me\/.+(https:%2F%2F[^/]+)/gsi, (...m) => decodeURIComponent(m[1]))
|
||||
.replace(/([?&])utm_[a-z]+=[^&?#]*/gsi, '$1') // Urchin Tracking Module
|
||||
.replace(/([?&])ec_[a-z]+=[^&?#]*/gsi, '$1') // Sitecore
|
||||
.replace(/^.+mandrillapp.com.+\?p=([a-z0-9]+)/gsi, (...m) => {
|
||||
let d = JSON.parse(atob(m[1]));
|
||||
if (d && d.p) {
|
||||
|
@ -32,6 +30,8 @@ const
|
|||
}
|
||||
return m[0];
|
||||
})
|
||||
.replace(/([?&])utm_[a-z]+=[^&?#]*/gsi, '$1') // Urchin Tracking Module
|
||||
.replace(/([?&])ec_[a-z]+=[^&?#]*/gsi, '$1') // Sitecore
|
||||
.replace(/&&+/, '');
|
||||
|
||||
export const
|
||||
|
|
Loading…
Add table
Reference in a new issue