diff --git a/src/mixins/richEditor/index.js b/src/mixins/richEditor/index.js index 2747225424..7414c8de2a 100644 --- a/src/mixins/richEditor/index.js +++ b/src/mixins/richEditor/index.js @@ -73,8 +73,6 @@ export default { */ parseContent(content) { let text = content - // Consecutive spaces in HTML tags should collapse - text = text.replace(/>\s+<') // Replace break lines with new lines text = text.replace(/
/gmi, '\n') // Replace some html special characters @@ -115,8 +113,10 @@ export default { : `@"${value}"` } - // Return template and make sure we strip of new lines and tabs - return this.renderComponentHtml(data, NcMentionBubble).replace(/[\n\t]/gmi, '') + // Return template and make sure we strip off new lines, tabs and consecutive whitespaces + return this.renderComponentHtml(data, NcMentionBubble) + .replace(/[\n\t]/gmi, '') + .replace(/>\s+<') }, /**