diff --git a/gui/main.qml b/gui/main.qml
index 397b4a9..baedc49 100644
--- a/gui/main.qml
+++ b/gui/main.qml
@@ -393,6 +393,7 @@ ApplicationWindow {
delegate: Loader {
width: chatList.width
+ height: item ? item.implicitHeight : 0
property var block: model
sourceComponent: {
switch (blockType) {
@@ -499,8 +500,13 @@ ApplicationWindow {
// --- Chat block delegates ---
function linkifyPaths(text) {
+ // Escape HTML entities first
+ let escaped = text.replace(/&/g, '&').replace(//g, '>')
+ // Convert newlines to
+ escaped = escaped.replace(/\n/g, '
')
// Match /absolute/path or /absolute/path:line
- return text.replace(/(\/[\w\-.\/]+(?::\d+)?)/g, '$1')
+ escaped = escaped.replace(/(\/[\w\-.\/]+(?::\d+)?)/g, '$1')
+ return escaped
}
Component {