From 7bc7be062b3b7bb1f28eb08ca7f7d138a213bf3d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 26 Aug 2014 17:09:26 +0200 Subject: [PATCH] Preserving special characters during conversion HTML -> BBCode --- .../install/files/js/3rdParty/redactor/plugins/wbbcode.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 43e9c4272a..6807649af6 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -170,6 +170,13 @@ RedactorPlugins.wbbcode = { WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'beforeConvertFromHtml', { html: html }); + // revert conversion of special characters + html = html.replace(/™/gi, '\u2122'); + html = html.replace(/©/gi, '\u00a9'); + html = html.replace(/…/gi, '\u2026'); + html = html.replace(/—/gi, '\u2014'); + html = html.replace(/‐/gi, '\u2010'); + // drop all new lines html = html.replace(/\r?\n/g, ''); -- 2.20.1