summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-01-27 14:03:34 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-01-27 14:03:54 +0100
commit213bcf0de6067081b4efe49b802fee98e7635d53 (patch)
tree82e83031f47c3ecd1090a7468396cb9b42066bca /src
parentTranslated using Weblate (French) (diff)
downloadnheko-213bcf0de6067081b4efe49b802fee98e7635d53.tar.xz
Fix br tags
Diffstat (limited to 'src')
-rw-r--r--src/Utils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp

index c23043a8..7830cc3c 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp
@@ -458,7 +458,9 @@ utils::escapeBlacklistedHtml(const QString &rawStr) if (tagNameEnd != end) { auto attrStart = tagNameEnd; auto attrsEnd = std::find(attrStart, end, '>'); - if (*(attrsEnd - 1) == '/') + // we don't want to consume the slash of self closing tags as part of an attribute. + // However, obviously we don't want to move backwards, if there are no attributes. + if (*(attrsEnd - 1) == '/' && attrStart < attrsEnd) attrsEnd -= 1; pos = attrsEnd;