This commit is contained in:
2021-05-07 09:21:15 +02:00
parent 7e536fe229
commit eb4076a07a
7 changed files with 621 additions and 5 deletions

View File

@ -231,11 +231,13 @@ MainAttachment::getDisclaim (string &plain, string &html) const {
// ================================================================================
void
MainAttachment::addPrevious (const string &href, const string &name) {
MainAttachment::addPrevious (const string &href, const string &name, const bool &trust) {
DEF_LOG ("Attachment::addPrevious", "href: " << href << " name: " << name);
const string oldVal = previousLinks [href];
if (name.empty ())
return;
if (oldVal.length () && name.length () && !trust)
return;
previousLinks.erase (href);
previousLinks [href] = name;
LOG ("inserted: " << href << ": " << previousLinks[href]);
@ -252,7 +254,7 @@ MainAttachment::extractLinks (const string &extractedPlainKAZ) {
++stopPos;
const string href (extractedPlainKAZ.substr (startPos, stopPos-startPos));
LOG ("plain href: " << href);
if (extractedPlainKAZ [stopPos] && extractedPlainKAZ [stopPos] != '\n')
++stopPos;
startPos = stopPos;

View File

@ -32,7 +32,7 @@
// knowledge of the CeCILL-B license and that you accept its terms. //
////////////////////////////////////////////////////////////////////////////
#define LAST_VERSION "eMailShrinker 1.3 2021-04-04"
#define LAST_VERSION "eMailShrinker 1.4 2021-05-07"
#include <iostream>
#include <fstream>