From 3f69a3c57243b6f6fff3710d38ba9f3fc0eb24eb Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 28 Aug 2020 16:00:30 +0200 Subject: [PATCH] fix parsing attributes with non-breakable space --- src/public/app/widgets/attribute_editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/attribute_editor.js b/src/public/app/widgets/attribute_editor.js index e0d46352c..d1113c708 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(/]+href="(#[A-Za-z0-9/]*)"[^>]*>[^<]*<\/a>/g, "$1"); + .replace(/]+href="(#[A-Za-z0-9/]*)"[^>]*>[^<]*<\/a>/g, "$1") + .replace(/ /g, " "); // otherwise .text() below outputs non-breaking space in unicode return $("
").html(str).text(); }