Rev 17 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17 | Rev 52 | ||
---|---|---|---|
Line 139... | Line 139... | ||
139 | } |
139 | } |
140 | return $dec; |
140 | return $dec; |
141 | } |
141 | } |
142 | 142 | ||
143 | function html_named_to_numeric_entities($str) { |
143 | function html_named_to_numeric_entities($str) { |
144 | if (!mb_detect_encoding($str, 'UTF-8', true)) $str = utf8_encode($str); |
144 | $str = mb_convert_encoding($str, 'UTF-8'); |
145 | return mb_htmlentities(decodeNamedEntities($str)); |
145 | return mb_htmlentities(decodeNamedEntities($str)); |
146 | } |
146 | } |
147 | 147 | ||
148 | if (!function_exists('decodeNamedEntities')) { |
148 | if (!function_exists('decodeNamedEntities')) { |
149 | function decodeNamedEntities($string) { |
149 | function decodeNamedEntities($string) { |