From 0dbc9ce659b8deca7f15b7bbdd6aedceee5a4d3d Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 7 Jul 2020 10:17:28 -0400 Subject: [PATCH] Fix mention CSS for display names containing < > --- src/gui/Pages/Chat/Timeline/EventContent.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/Pages/Chat/Timeline/EventContent.qml b/src/gui/Pages/Chat/Timeline/EventContent.qml index 2ceb65cc..b11edac1 100644 --- a/src/gui/Pages/Chat/Timeline/EventContent.qml +++ b/src/gui/Pages/Chat/Timeline/EventContent.qml @@ -20,9 +20,8 @@ HRowLayout { if (! link.match(/^https?:\/\/matrix.to\/#\/@.+/)) continue lines.push( - `.mention[data-mention='${name}'] { color: ` + - utils.nameColor(name) + - "}" + `.mention[data-mention='${utils.escapeHtml(name)}'] ` + + `{ color: ${utils.nameColor(name)} }` ) } @@ -48,6 +47,8 @@ HRowLayout { readonly property string hoveredLink: contentLabel.hoveredLink readonly property bool hoveredSelectable: contentHover.hovered + readonly property alias contentLabel: contentLabel + readonly property int xOffset: onRight ? Math.min(