summary refs log tree commit diff
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-12 13:40:42 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-12 13:40:42 +0300
commita0a76e352bc1a05f6f4b475c6dab4ba026b4b9b0 (patch)
tree5c5251ba35c327b58dd46d22f3e3745b55fd5368 /src/Utils.cpp
parentDon't break the layout on empty text messages (diff)
downloadnheko-a0a76e352bc1a05f6f4b475c6dab4ba026b4b9b0.tar.xz
Enable html attributes
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 6ac675d4..84978bae 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -306,7 +306,14 @@ utils::linkifyMessage(const QString &body)
                         if (xml.name() == "html")
                                 break;
 
-                        textString += "<" + xml.name() + ">";
+                        textString += "<" + xml.name();
+
+                        const auto attrs = xml.attributes();
+                        for (const auto &e : attrs)
+                                textString += QString(" %1=\"%2\"").arg(e.name()).arg(e.value());
+
+                        textString += ">";
+
                         break;
                 }
                 case QXmlStreamReader::EndElement: {