mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 15:49:00 +02:00
fix(views/board): creating new notes would render as HTML
This commit is contained in:
parent
3a569499cb
commit
96ca3d5e38
@ -192,7 +192,7 @@ export class DifferentialBoardRenderer {
|
||||
$existingCard.contents().filter(function() {
|
||||
return this.nodeType === 3; // Text nodes
|
||||
}).remove();
|
||||
$existingCard.append(item.note.title);
|
||||
$existingCard.append(document.createTextNode(item.note.title));
|
||||
}
|
||||
|
||||
// Ensure card is in correct position
|
||||
@ -413,7 +413,8 @@ export class DifferentialBoardRenderer {
|
||||
// Restore the card content
|
||||
const iconClass = $card.attr('data-icon-class') || 'bx bx-file';
|
||||
const $newIcon = $('<span>').addClass('icon').addClass(iconClass);
|
||||
$card.empty().append($newIcon, finalTitle);
|
||||
$card.text(finalTitle);
|
||||
$card.prepend($newIcon);
|
||||
|
||||
// Re-attach click handler for quick edit (for existing cards)
|
||||
$card.on('click', () => appContext.triggerCommand("openInPopup", { noteIdOrPath: noteId }));
|
||||
|
Loading…
x
Reference in New Issue
Block a user