diff options
author | Friendika <info@friendika.com> | 2011-08-18 19:14:13 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-08-18 19:14:13 -0700 |
commit | 457f8c3e957859972b6b0c8a235d38da0986bcbf (patch) | |
tree | ba5addd14e4a78ba5ca8a6d2fe43788b03111d02 | |
parent | 2df7251b349fa3ef9650cf8adb1fb680f253930d (diff) | |
download | volse-hubzilla-457f8c3e957859972b6b0c8a235d38da0986bcbf.tar.gz volse-hubzilla-457f8c3e957859972b6b0c8a235d38da0986bcbf.tar.bz2 volse-hubzilla-457f8c3e957859972b6b0c8a235d38da0986bcbf.zip |
use mb_strlen when iterating utf8
-rw-r--r-- | include/items.php | 2 | ||||
-rw-r--r-- | include/text.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php index ec519ad9b..39a61c4ad 100644 --- a/include/items.php +++ b/include/items.php @@ -1635,7 +1635,7 @@ function atom_entry($item,$type,$author,$owner,$comment = false) { $o .= '<published>' . xmlify(datetime_convert('UTC','UTC',$item['created'] . '+00:00',ATOM_TIME)) . '</published>' . "\r\n"; $o .= '<updated>' . xmlify(datetime_convert('UTC','UTC',$item['edited'] . '+00:00',ATOM_TIME)) . '</updated>' . "\r\n"; $o .= '<dfrn:env>' . base64url_encode($body, true) . '</dfrn:env>' . "\r\n"; - $o .= '<content type="' . $type . '" >' . xmlify(($type === 'html') ? bbcode($body) : $body) . '</content>' . "\r\n"; + $o .= '<content type="' . $type . '" >' . xmlify((($type === 'html') ? bbcode($body) : $body)) . '</content>' . "\r\n"; $o .= '<link rel="alternate" type="text/html" href="' . xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']) . '" />' . "\r\n"; if($comment) $o .= '<dfrn:comment-allow>' . intval($item['last-child']) . '</dfrn:comment-allow>' . "\r\n"; diff --git a/include/text.php b/include/text.php index 803bf0e51..b13cf980f 100644 --- a/include/text.php +++ b/include/text.php @@ -147,7 +147,7 @@ if(! function_exists('xmlify')) { function xmlify($str) { $buffer = ''; - for($x = 0; $x < strlen($str); $x ++) { + for($x = 0; $x < mb_strlen($str); $x ++) { $char = $str[$x]; switch( $char ) { |