diff --git a/plugins/talk-plugin-rich-text/client/utils.js b/plugins/talk-plugin-rich-text/client/utils.js
index 4f49b3654..80132d646 100644
--- a/plugins/talk-plugin-rich-text/client/utils.js
+++ b/plugins/talk-plugin-rich-text/client/utils.js
@@ -1,12 +1,7 @@
export function htmlNormalizer(htmlInput) {
let str = htmlInput;
- // We are normalizing the input from contenteditable of each browser, also removing unnecesary html tags
- // https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content#Differences_in_markup_generation
-
- // Old browsers uses `p` normalize to `div` instead.
- str = str
- .replace(/
') // IE and old browsers outputs
instead of
s
- .replace(/<\/p>/g, '
'); // IE and old browsers outputs
instead of
s
+ // Some tags have not been normalized across browsers in `Coral RTE` yet.
+ // So we'll do this manual step here for now.
// Harmonize all to tag.
str = str
diff --git a/plugins/talk-plugin-rich-text/server/config.js b/plugins/talk-plugin-rich-text/server/config.js
index 347502d08..a9614a8f0 100644
--- a/plugins/talk-plugin-rich-text/server/config.js
+++ b/plugins/talk-plugin-rich-text/server/config.js
@@ -14,7 +14,7 @@ const config = {
// TODO: move to admin eventually
// Super strict rules to make sure users only submit the tags they are allowed
dompurify: {
- ALLOWED_TAGS: ['b', 'i', 'blockquote', 'br', 'div'],
+ ALLOWED_TAGS: ['b', 'i', 'blockquote', 'br', 'div', 'span'],
ALLOWED_ATTR: [],
},