Commit 9ddeffbe authored by colemanw's avatar colemanw
Browse files

Use built-in php function to do what we were trying to do with str_replace

parent dea4ed13
......@@ -365,11 +365,7 @@ class CRM_Afform_ArrayHtml {
* @return string
*/
public function replaceUnicodeChars($markup) {
// TODO: Potentially replace other unicode characters that can be represented as html entities
$replace = [
["\xc2\xa0", ' '],
];
return str_replace(array_column($replace, 0), array_column($replace, 1), $markup);
return mb_convert_encoding($markup, 'HTML-ENTITIES', 'UTF-8');
}
/**
......
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