projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3273f0
)
Use built-in php function to do what we were trying to do with str_replace
author
Coleman Watts
<coleman@civicrm.org>
Fri, 31 Jan 2020 16:40:26 +0000
(11:40 -0500)
committer
CiviCRM
<info@civicrm.org>
Wed, 16 Sep 2020 02:13:21 +0000
(19:13 -0700)
ext/afform/core/CRM/Afform/ArrayHtml.php
patch
|
blob
|
blame
|
history
diff --git
a/ext/afform/core/CRM/Afform/ArrayHtml.php
b/ext/afform/core/CRM/Afform/ArrayHtml.php
index 84a4ae15d4208d006f63cfc4fe1d99bde8b9db1a..464363f5bf691174c3ac3ac0f92a521bbc71d063 100644
(file)
--- a/
ext/afform/core/CRM/Afform/ArrayHtml.php
+++ b/
ext/afform/core/CRM/Afform/ArrayHtml.php
@@
-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');
}
/**