From: Alexander Ebert Date: Tue, 26 Aug 2014 15:09:26 +0000 (+0200) Subject: Preserving special characters during conversion HTML -> BBCode X-Git-Tag: 2.1.0_Alpha_1~405 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7bc7be062b3b7bb1f28eb08ca7f7d138a213bf3d;p=GitHub%2FWoltLab%2FWCF.git Preserving special characters during conversion HTML -> BBCode --- 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, '');