Browse Source

parsing multi-byte strings with xmlify

pull/601/head
Zach Prezkuta 8 years ago
parent
commit
18f71c1050
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      include/text.php

+ 3
- 2
include/text.php View File

@ -175,8 +175,9 @@ if(! function_exists('xmlify')) {
function xmlify($str) {
$buffer = '';
$str_array = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);
foreach($str_array as $char) {
$len = mb_strlen($str);
for($x = 0; $x < $len; $x ++) {
$char = mb_substr($str,$x,1);
switch( $char ) {


Loading…
Cancel
Save