Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix parsing attributes with non-breakable space
zadam3f69a3c57243
diff --git a/src/public/app/widgets/attribute_editor.js b/src/public/app/widgets/attribute_editor.jsindex e0d46352cd..d1113c708a 100644--- a/src/public/app/widgets/attribute_editor.js+++ b/src/public/app/widgets/attribute_editor.js@@ -311,7 +311,8 @@ export default class AttributeEditorWidget extends TabAwareWidget {getPreprocessedData() {const str = this.textEditor.getData()- .replace(/<a[^>]+href="(#[A-Za-z0-9/]*)"[^>]*>[^<]*<\/a>/g, "$1");+ .replace(/<a[^>]+href="(#[A-Za-z0-9/]*)"[^>]*>[^<]*<\/a>/g, "$1")+ .replace(/ /g, " "); // otherwise .text() below outputs non-breaking space in unicodereturn $("<div>").html(str).text();}