added wt_zmc to tracking parameters list

This commit is contained in:
tastytea 2018-05-21 20:48:51 +02:00
parent 08bec96131
commit 60336c84b2
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
2 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (expandurl-mastodon
VERSION 0.5.3
VERSION 0.5.4
LANGUAGES CXX
)

View File

@ -81,12 +81,13 @@ const string strip(const string &url)
using namespace std::regex_constants;
string newurl = url;
const std::array<const replace_pair, 4> replace_array =
const std::array<const replace_pair, 5> replace_array =
{{
{ std::regex("[\\?&]utm_[^&]+", icase), "" }, // Google
{ std::regex("[\\?&]wtmc=[^&]+", icase), "" }, // Twitter
{ std::regex("[\\?&]__twitter_impression=[^&]+", icase), "" }, // Twitter
{ std::regex("//amp\\.", icase), "//" }, // AMP
{ std::regex("[\\?&]wtmc=[^&]+", icase), "" }, // Twitter?
{ std::regex("[\\?&]__twitter_impression=[^&]+", icase), "" }, // Twitter?
{ std::regex("[\\?&]wt_zmc=[^&]+", icase), "" }, // Twitter?
{ std::regex("//amp\\.", icase), "//" } // AMP
}};
for (const replace_pair &pair : replace_array)