Browse files

Use bytcode sequence for unicode ellipsis

The codepoint for "horizontal ellipsis" is 0x2026, which enables a more
robust display of that character on different systems.
  • Loading branch information...
1 parent fe4f9f2 commit c7fda5674e221bfb70aa315505cf58fa5d0cce2e Alexander Hofbauer committed Nov 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Utility/String.php
View
2 lib/Cake/Utility/String.php
@@ -479,7 +479,7 @@ public static function truncate($text, $length = 100, $options = array()) {
if (isset($options['ending'])) {
$default['ellipsis'] = $options['ending'];
} elseif (!empty($options['html']) && Configure::read('App.encoding') == 'UTF-8') {
- $default['ellipsis'] = chr(226);
+ $default['ellipsis'] = "\xE2\x80\xA6";
}
$options = array_merge($default, $options);
extract($options);

0 comments on commit c7fda56

Please sign in to comment.