mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix parsing attributes with non-breakable space
This commit is contained in:
parent
268910ed3b
commit
3f69a3c572
@ -311,7 +311,8 @@ export default class AttributeEditorWidget extends TabAwareWidget {
|
|||||||
|
|
||||||
getPreprocessedData() {
|
getPreprocessedData() {
|
||||||
const str = this.textEditor.getData()
|
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 unicode
|
||||||
|
|
||||||
return $("<div>").html(str).text();
|
return $("<div>").html(str).text();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user