Fix parsing self-closing tags with no space (such as <br/>)
If there was no space between the tag name and the slash of a self-closing tag, the code assumes that the tag name is "br/". This commit adds the slash as a character to close a tag on, so that "<br/>" is treated as a self-closing "br". BUG: 487377
This commit is contained in:
@@ -57,7 +57,8 @@ inline QColor getUserColor(qreal hueF)
|
||||
|
||||
namespace TextRegex
|
||||
{
|
||||
static const QRegularExpression endTagType{QStringLiteral("(>| )")};
|
||||
static const QRegularExpression endTagType{QStringLiteral("[> /]")};
|
||||
static const QRegularExpression endAttributeType{QStringLiteral("[> ]")};
|
||||
static const QRegularExpression attributeData{QStringLiteral("['\"](.*?)['\"]")};
|
||||
static const QRegularExpression removeReply{QStringLiteral("> <.*?>.*?\\n\\n"), QRegularExpression::DotMatchesEverythingOption};
|
||||
static const QRegularExpression removeRichReply{QStringLiteral("<mx-reply>.*?</mx-reply>"), QRegularExpression::DotMatchesEverythingOption};
|
||||
|
||||
Reference in New Issue
Block a user