Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix editor HTML beautification in incorrectly adding breaks to links.

Kailash Nadh636db204fcf0
diff --git a/frontend/src/components/Editor.vue b/frontend/src/components/Editor.vue
index a0a333b6..54793f5a 100644
--- a/frontend/src/components/Editor.vue
+++ b/frontend/src/components/Editor.vue
@@ -375,7 +375,7 @@ export default {
beautifyHTML(str) {
// Pad all tags with linebreaks.
- let s = this.trimLines(str.replace(/(<([^>]+)>)/ig, '\n$1\n'), true);
+ let s = this.trimLines(str.replace(/(<(?!(\/)?a|span)([^>]+)>)/ig, '\n$1\n'), true);
// Remove extra linebreaks.
s = s.replace(/\n+/g, '\n');