Convert &#[0-9]+ entities to UTF-8

This commit is contained in:
savvasha
2019-02-21 21:35:26 +02:00
parent 5020512242
commit a65b29015c

View File

@@ -135,6 +135,9 @@ foreach ( $events as $event):
$summary = $event->post_title; $summary = $event->post_title;
} }
//Convert &#[0-9]+ entities to UTF-8
$summary = preg_replace_callback("/(&#[0-9]+;)/", function($m) { return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES"); }, $summary);
// Append to output string // Append to output string
$output .= $output .=
"BEGIN:VEVENT\r\n" . "BEGIN:VEVENT\r\n" .