Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kalendar
Commits
04cdebed
Commit
04cdebed
authored
Aug 12, 2022
by
Carl Schwan
🚴
Browse files
Remove more dead code
Signed-off-by:
Carl Schwan
<
carl@carlschwan.eu
>
parent
a0d2217d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/mail/mime/mailtemplates.cpp
View file @
04cdebed
...
...
@@ -241,28 +241,6 @@ QString plainToHtml(const QString &body)
return
str
;
}
// TODO implement this function using a DOM tree parser
QString
makeValidHtml
(
const
QString
&
body
)
{
QString
newBody
=
body
;
QRegExp
regEx
;
regEx
.
setMinimal
(
true
);
regEx
.
setPattern
(
QStringLiteral
(
"<html.*>"
));
if
(
!
newBody
.
isEmpty
()
&&
!
newBody
.
contains
(
regEx
))
{
regEx
.
setPattern
(
QStringLiteral
(
"<body.*>"
));
if
(
!
newBody
.
contains
(
regEx
))
{
newBody
=
QLatin1String
(
"<body>"
)
+
body
+
QLatin1String
(
"<br/></body>"
);
}
// regEx.setPattern(QStringLiteral("<head.*>"));
// if (!newBody.contains(regEx)) {
// newBody = QLatin1String("<head>") + headElement + QLatin1String("</head>") + body;
// }
newBody
=
QLatin1String
(
"<html>"
)
+
body
+
QLatin1String
(
"</html>"
);
}
return
newBody
;
}
// FIXME strip signature works partially for HTML mails
static
QString
stripSignature
(
const
QString
&
msg
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment