]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Closes #5053 decodes html entities for email subjects
authorcash <cash.costello@gmail.com>
Mon, 18 Feb 2013 14:50:34 +0000 (09:50 -0500)
committercash <cash.costello@gmail.com>
Mon, 18 Feb 2013 14:50:34 +0000 (09:50 -0500)
engine/lib/notification.php

index 56e5911927958089de541aa73be86a8272ed06fc..b6399b3c6a97f5b699c4ae7141c021078f38862c 100644 (file)
@@ -347,6 +347,8 @@ function elgg_send_email($from, $to, $subject, $body, array $params = NULL) {
 
        // Sanitise subject by stripping line endings
        $subject = preg_replace("/(\r\n|\r|\n)/", " ", $subject);
+       // this is because Elgg encodes everything and matches what is done with body
+       $subject = html_entity_decode($subject, ENT_COMPAT, 'UTF-8'); // Decode any html entities
        if (is_callable('mb_encode_mimeheader')) {
                $subject = mb_encode_mimeheader($subject, "UTF-8", "B");
        }