// drop <br>, they are pointless because the editor already adds a newline after them
html = html.replace(/<br>/g, '');
- html = html.replace(/ /gi, " ");
// [quote]
html = html.replace(/<blockquote([^>]+)>\n?<header[^>]*?>[\s\S]*?<\/header>/gi, function(match, attributes, innerContent) {
WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'afterConvertToHtml', { data: data });
+ // double-encode the ampersand, otherwise Redactor removes it
+ data = data.replace(/&nbsp;/g, '&amp;nbsp;');
+
return data;
},