diff --git a/src/cpp/Attachment.cpp b/src/cpp/Attachment.cpp index 57c4ce7..42ae956 100644 --- a/src/cpp/Attachment.cpp +++ b/src/cpp/Attachment.cpp @@ -297,10 +297,23 @@ Attachment::Attachment (ifstream &mbox, const int &level, const streamoff beginI // ================================================================================ inline string -cleanString (const string &line) { +cleanString (string line) { + static const regex findVarVal ("(\\s*[a-zA-Z_*-]+=)((\"(\\\\.|[^\\\\])*\")|[^; \t]*;?)"); + string result; + smatch m; + + while (regex_search (line, m, findVarVal)) { + result += m.prefix (); + string id (m[1]); + toLower (id); + result += id; + result += m[2]; + line = m.suffix (); + } if (!line.empty () && line[line.size() - 1] == '\r') - return line.substr (0, line.size () - 1); - return line; + line = line.substr (0, line.size () - 1); + result += line; + return result; } void diff --git a/src/cpp/eMailShrinker.cpp b/src/cpp/eMailShrinker.cpp index 9f01c76..fdff28e 100644 --- a/src/cpp/eMailShrinker.cpp +++ b/src/cpp/eMailShrinker.cpp @@ -33,8 +33,8 @@ //////////////////////////////////////////////////////////////////////////// #include "version.hpp" -const std::string kaz::LAST_VERSION_NUM ("2.18"); -const std::string kaz::LAST_VERSION_DATE ("2023-10-29"); +const std::string kaz::LAST_VERSION_NUM ("2.19"); +const std::string kaz::LAST_VERSION_DATE ("2024-02-11"); const std::string kaz::LAST_VERSION (LAST_VERSION_NUM+" "+LAST_VERSION_DATE+" eMailShrinker"); #include