diff options
-rw-r--r-- | plugins/remove_get_trackers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/remove_get_trackers.py b/plugins/remove_get_trackers.py index 9c1eb9c1..423e9b4e 100644 --- a/plugins/remove_get_trackers.py +++ b/plugins/remove_get_trackers.py @@ -17,6 +17,6 @@ class Plugin(BasePlugin): # ref_src, ref_url: twitter # Others exist but are excluded because they are not common. # See https://en.wikipedia.org/wiki/UTM_parameters - msg['body'] = re.sub('&?(fbclid|dclid|ncid|utm_source|utm_medium|utm_campaign|utm_term|utm_content|ref_src|ref_url)=[^ &#]*', - '', + msg['body'] = re.sub('(https?://[^ ]+)&?(fbclid|dclid|ncid|utm_source|utm_medium|utm_campaign|utm_term|utm_content|ref_src|ref_url)=[^ &#]*', + r'\1', msg['body']) |