mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-10-11 06:06:29 +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
|
stripTracking = text => text
|
||||||
.replace(/tracking\.(printabout\.nl[^?]+)\?.*/gsi, (...m) => m[1])
|
.replace(/tracking\.(printabout\.nl[^?]+)\?.*/gsi, (...m) => m[1])
|
||||||
.replace(/^.+awstrack\.me\/.+(https:%2F%2F[^/]+)/gsi, (...m) => decodeURIComponent(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) => {
|
.replace(/^.+mandrillapp.com.+\?p=([a-z0-9]+)/gsi, (...m) => {
|
||||||
let d = JSON.parse(atob(m[1]));
|
let d = JSON.parse(atob(m[1]));
|
||||||
if (d && d.p) {
|
if (d && d.p) {
|
||||||
|
@ -32,6 +30,8 @@ const
|
||||||
}
|
}
|
||||||
return m[0];
|
return m[0];
|
||||||
})
|
})
|
||||||
|
.replace(/([?&])utm_[a-z]+=[^&?#]*/gsi, '$1') // Urchin Tracking Module
|
||||||
|
.replace(/([?&])ec_[a-z]+=[^&?#]*/gsi, '$1') // Sitecore
|
||||||
.replace(/&&+/, '');
|
.replace(/&&+/, '');
|
||||||
|
|
||||||
export const
|
export const
|
||||||
|
|
Loading…
Add table
Reference in a new issue