From 550bf0d14b5ab70beb088611cd2fc1d239c104e3 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 22 May 2012 03:06:58 -0400
Subject: [PATCH] - Fix HTML entities handling in HTML editor (#1488483)
---
CHANGELOG | 1 +
program/steps/mail/compose.inc | 1 +
program/steps/settings/edit_identity.inc | 2 ++
3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index fc62b38..e38a509 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix HTML entities handling in HTML editor (#1488483)
- Fix listing shared folders on Courier IMAP (#1488466)
RELEASE 0.8-rc
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index ebf79be..8152f5d 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -770,6 +770,7 @@
// If desired, set this textarea to be editable by TinyMCE
if ($isHtml) {
+ $MESSAGE_BODY = htmlentities($MESSAGE_BODY, ENT_NOQUOTES, RCMAIL_CHARSET);
$attrib['class'] = 'mce_editor';
$textarea = new html_textarea($attrib);
$out .= $textarea->show($MESSAGE_BODY);
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc
index f594525..c3ac468 100644
--- a/program/steps/settings/edit_identity.inc
+++ b/program/steps/settings/edit_identity.inc
@@ -91,6 +91,8 @@
$form['signature']['content']['signature']['class'] = 'mce_editor';
}
+ $IDENTITY_RECORD['signature'] = htmlentities($IDENTITY_RECORD['signature'], ENT_NOQUOTES, RCMAIL_CHARSET);
+
// disable some field according to access level
if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) {
$form['addressing']['content']['email']['disabled'] = true;
--
Gitblit v1.9.1