summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-12-13 12:15:03 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-12-13 12:15:03 +0100
commit8f0b7c2aa54b9d93e35871efd1cf4e8a23faf557 (patch)
tree4d9cbec0d88908a73685f2a763d170ff9ea611cf /framework
parentfe337d0f3b9d6310d390c636b356a0af424b6cc3 (diff)
downloadkube-8f0b7c2aa54b9d93e35871efd1cf4e8a23faf557.tar.gz
kube-8f0b7c2aa54b9d93e35871efd1cf4e8a23faf557.zip
Html mails that don't adhere to the strict dtd are probably too complex
Diffstat (limited to 'framework')
-rw-r--r--framework/src/domain/mime/partmodel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/framework/src/domain/mime/partmodel.cpp b/framework/src/domain/mime/partmodel.cpp
index 01b640b6..c363da33 100644
--- a/framework/src/domain/mime/partmodel.cpp
+++ b/framework/src/domain/mime/partmodel.cpp
@@ -201,6 +201,13 @@ QVariant PartModel::data(const QModelIndex &index, int role) const
201 auto complexHtml = [&] { 201 auto complexHtml = [&] {
202 if (messagePart->isHtml()) { 202 if (messagePart->isHtml()) {
203 const auto text = messagePart->htmlContent(); 203 const auto text = messagePart->htmlContent();
204 if (text.contains("<!DOCTYPE html PUBLIC")) {
205 //We can probably deal with this if it adheres to the strict dtd
206 //(that's what our composer produces as well)
207 if (!text.contains("http://www.w3.org/TR/REC-html40/strict.dtd")) {
208 return true;
209 }
210 }
204 //Media queries are too advanced 211 //Media queries are too advanced
205 if (text.contains("@media")) { 212 if (text.contains("@media")) {
206 return true; 213 return true;