summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-09-27 21:58:24 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-09-28 12:03:04 +0200
commit8985c2d1d4b297ea9fdc70e79e344bde73356216 (patch)
treec3440d2e04c4a21611e8eed4167fa6ce019e5c92 /src
parentBump mtxclient to released version (diff)
downloadnheko-8985c2d1d4b297ea9fdc70e79e344bde73356216.tar.xz
Fix infinite loop that can be triggered by some invalid html
Diffstat (limited to 'src')
-rw-r--r--src/Utils.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp

index 0e193c43..d6c701b0 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp
@@ -494,7 +494,11 @@ utils::escapeBlacklistedHtml(const QString &rawStr) attrStart = consumeSpaces(attrEnd); - if (attrStart < attrsEnd) { + if (attrName.isEmpty()) { + buffer.append(QUrl::toPercentEncoding(QString(QByteArray(attrStart, 1)))); + attrStart++; + continue; + } else if (attrStart < attrsEnd) { if (*attrStart == '=') { attrStart = consumeSpaces(attrStart + 1);