diff --git a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp index 04d69a49fa52edfe74b8386064c8f36a3553e569..2a81dd25f0909be07dd94f677a20c8e03db938c9 100644 --- a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp +++ b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp @@ -297,8 +297,8 @@ bool containsExternalReferences(const QString &str, const QString &extraHead) QString processHtml(const QString &htmlSource, QString &extraHead) { QString s = htmlSource.trimmed(); - s = s.replace(QRegExp(QStringLiteral("^]*>"), Qt::CaseInsensitive), QString()).trimmed(); - s = s.replace(QRegExp(QStringLiteral("^]*>"), Qt::CaseInsensitive), QString()).trimmed(); + s = s.remove(QRegExp(QStringLiteral("^]*>"), Qt::CaseInsensitive)).trimmed(); + s = s.remove(QRegExp(QStringLiteral("^]*>"), Qt::CaseInsensitive)).trimmed(); // head s = s.replace(QRegExp(QStringLiteral("^"), Qt::CaseInsensitive), QString()).trimmed(); @@ -319,9 +319,9 @@ QString processHtml(const QString &htmlSource, QString &extraHead) } // body - s = s.replace(QRegExp(QStringLiteral("]*>"), Qt::CaseInsensitive), QString()).trimmed(); - s = s.replace(QRegExp(QStringLiteral("$"), Qt::CaseInsensitive), QString()).trimmed(); - s = s.replace(QRegExp(QStringLiteral("$"), Qt::CaseInsensitive), QString()).trimmed(); + s = s.remove(QRegExp(QStringLiteral("]*>"), Qt::CaseInsensitive)).trimmed(); + s = s.remove(QRegExp(QStringLiteral("$"), Qt::CaseInsensitive)).trimmed(); + s = s.remove(QRegExp(QStringLiteral("$"), Qt::CaseInsensitive)).trimmed(); return s; }