diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fa9171..aed811c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (expandurl-mastodon - VERSION 0.5.3 + VERSION 0.5.4 LANGUAGES CXX ) diff --git a/src/url.cpp b/src/url.cpp index d99d649..37b2375 100644 --- a/src/url.cpp +++ b/src/url.cpp @@ -81,12 +81,13 @@ const string strip(const string &url) using namespace std::regex_constants; string newurl = url; - const std::array replace_array = + const std::array 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)