Commit 27858338 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix utf8 characters in notifications (bug #3439)


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 624363ca
......@@ -2387,8 +2387,11 @@ function clean_html($text) {
* @param string $html The html to be formatted
* @return string The formatted text
*/
function html2text($html) {
function html2text($html, $fragment=true) {
require_once('htmltotext/htmltotext.php');
if ($fragment) {
$html = '<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head>' . $html;
}
$h2t = new HtmltoText($html, get_config('wwwroot'));
return $h2t->text();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment