This commit is contained in:
Nicolas Werner 2020-12-25 04:11:47 +01:00
parent be9df45af9
commit 904cafcd39
6 changed files with 25 additions and 15 deletions

View file

@ -388,8 +388,9 @@ utils::escapeBlacklistedHtml(const QString &rawStr)
switch (data.at(pos)) {
case '<': {
bool oneTagMatched = false;
const int endPos = static_cast<int>(std::min(static_cast<size_t>(data.indexOf('>', pos)),
static_cast<size_t>(data.indexOf(' ', pos))));
const int endPos =
static_cast<int>(std::min(static_cast<size_t>(data.indexOf('>', pos)),
static_cast<size_t>(data.indexOf(' ', pos))));
auto mid = data.mid(pos + 1, endPos - pos - 1);
for (const auto &tag : allowedTags) {