summary refs log tree commit diff
path: root/src/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp

index ddd066d7..1746883e 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp
@@ -317,7 +317,7 @@ utils::linkifyMessage(const QString &body) QString utils::escapeBlacklistedHtml(const QString &rawStr) { - static const std::vector<std::string_view> allowedTags = { + static const std::array allowedTags = { "font", "/font", "del", "/del", "h1", "/h1", "h2", "/h2", "h3", "/h3", "h4", "/h4", "h5", "/h5", "h6", "/h6", "blockquote", "/blockquote", "p", "/p", "a", "/a", "ul", "/ul", @@ -342,7 +342,7 @@ utils::escapeBlacklistedHtml(const QString &rawStr) auto mid = data.mid(pos + 1, endPos - pos - 1); for (const auto &tag : allowedTags) { // TODO: Check src and href attribute - if (mid.compare(tag.data(), Qt::CaseInsensitive) == 0) { + if (mid.toLower() == tag) { oneTagMatched = true; } }