Fix once and for all the communication module with french/accented characters -- since fckeditor only does utf8, do the conversion immediately to ISO when its submitted, and then allow the system to use ISO everywhere from there on out

This commit is contained in:
james 2010-02-11 16:41:17 +00:00
parent a1865e267b
commit a42e042bcc

View File

@ -157,6 +157,11 @@ case 'email_save':
/* Allow the fundraising campaigns id to be NULL, it'll never be 0 */
$fcstr = ($fcid == 0) ? 'NULL' : "'$fcid'";
$bodyhtml=iconv("UTF-8","ISO-8859-1",$bodyhtml);
$name=iconv("UTF-8","ISO-8859-1",$name);
$description=iconv("UTF-8","ISO-8859-1",$description);
$from=iconv("UTF-8","ISO-8859-1",$from);
$subject=iconv("UTF-8","ISO-8859-1",$subject);
$body=getTextFromHtml($bodyhtml);
mysql_query("UPDATE emails SET
@ -735,12 +740,12 @@ case "email_get_list":
echo "</select>";
echo "</td></tr>";
echo "<tr><td><b>Date:</b></td><td>".date("r")."</td></tr>";
echo "<tr><td><b>Subject:</b></td><td>".htmlspecialchars(iconv("UTF-8","ISO-8859-1//TRANSLIT",$r->subject))."</td></tr>";
echo "<tr><td><b>Subject:</b></td><td>".htmlspecialchars($r->subject)."</td></tr>";
if($r->bodyhtml) {
$body=iconv("UTF-8","ISO-8859-1//TRANSLIT",$r->bodyhtml);
$body=$r->bodyhtml;
}
else {
$body=nl2br(htmlspecialchars(iconv("UTF-8","ISO-8859-1//TRANSLIT",$r->body)));
$body=nl2br(htmlspecialchars($r->body));
}
echo "<tr><td colspan=2>".$body."</td></tr>";