summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-07 12:50:23 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-07 12:50:23 (GMT)
commitce24fc860ee444147070573cda42fe2d1369d75c (patch)
tree9881bcbbde3af32a4ac04926fd103f927da2947e
parente9c579ea85ba3d4f98384c2033a3b86a6f709101 (diff)
Fix Bug 372085 - KMail 5.3.2: forwarding or replying to html mails do not preserve links
FIXED-IN: 5.4.0 BUG: 372085
-rw-r--r--messagecomposer/src/composer/composerviewbase.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/messagecomposer/src/composer/composerviewbase.cpp b/messagecomposer/src/composer/composerviewbase.cpp
index 670f4f6..abadde2 100644
--- a/messagecomposer/src/composer/composerviewbase.cpp
+++ b/messagecomposer/src/composer/composerviewbase.cpp
@@ -206,10 +206,12 @@ void MessageComposer::ComposerViewBase::setMessage(const KMime::Message::Ptr &ms
}
// Set the HTML text and collect HTML images
- const QString htmlContent = otp.htmlContent();
+ QString htmlContent = otp.htmlContent();
if (htmlContent.isEmpty()) {
m_editor->setPlainText(otp.plainTextContent());
} else {
+ //Bug 372085 <div id="name"> is replaced in qtextedit by <a id="name">... => break url
+ htmlContent.replace(QRegularExpression(QStringLiteral("<div\\s*id=\".*\">")), QStringLiteral("<div>"));
m_editor->setHtml(htmlContent);
Q_EMIT enableHtml();
collectImages(m_msg.data());