Browse files

Encode text message in editor (#362)

The text message in the editor was not properly encoded, when the data was rendered a second time (and edited) this resulted in the browser transmitting HTML special characters instead of the encoded versions. Thus breaking stuff that relied on special characters such as URLs containing `&curren`.

To reproduce this:

1. Enable the manual text editor (define('USE_MANUAL_TEXT_PART',1);)
2. Enter the following message as text: ""3. Go to the next section
4. Go back to "Text" and see it broken (since it's double encoded)


Signed-off-by: Xheni Myrtaj <>
  • Loading branch information...
xh3n1 authored and michield committed Jun 30, 2018
1 parent 3449a97 commit 25ad3665446a9506aac116602315f50830158193
Showing with 1 addition and 1 deletion.
  1. +1 −1 public_html/lists/admin/send_core.php
@@ -905,7 +905,7 @@ function submitform() {
<label for="textmessage">' .$GLOBALS['I18N']->get('Plain text version of message').Help('plaintextversion').'</label>'.'
<div id="generatetextversion">' .PageLinkAjax('send&tab=Text&id='.$id.'&action=generatetext',
$GLOBALS['I18N']->get('generate from HTML')).'</a> '.Help('generatetext').'</div>
<textarea id="textmessage" name="textmessage" cols="65" rows="20">' .$messagedata['textmessage'].'</textarea>
<textarea id="textmessage" name="textmessage" cols="65" rows="20">' .htmlentities($messagedata['textmessage']).'</textarea>

0 comments on commit 25ad366

Please sign in to comment.