{/each}
@@ -362,6 +362,14 @@
this.set({ choices: choices })
}
},
+ helpers: {
+ cleanTitle (title) {
+ // Remove newlines and tabs.
+ // Mastodon UI doesn't care because in CSS it's formatted to be single-line, but we care
+ // if people somehow insert newlines, because it can really mess up the formatting.
+ return (title && title.replace(/[\n\t]+/g, ' ')) || ''
+ }
+ },
components: {
SvgIcon
}