From bf4d559523e956523a617213fa1cc3c36fab24e4 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 13 Sep 2018 11:02:54 +0300 Subject: Strip paragraph tags fixes #438 --- src/Utils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Utils.cpp') diff --git a/src/Utils.cpp b/src/Utils.cpp index 5a0558f4..308c0af9 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -350,11 +350,11 @@ utils::markdownToHtml(const QString &text) // The buffer is no longer needed. free((char *)tmp_buf); - return QString::fromStdString(html).trimmed(); -} + auto result = QString::fromStdString(html).trimmed(); -std::string -utils::stripHtml(const QString &text) -{ - return text.trimmed().remove(QRegExp("<[^>]*>")).toStdString(); + // Strip paragraph tags. + result.replace("

", ""); + result.replace("

", ""); + + return result; } -- cgit 1.5.1