1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-07 11:28:22 +02:00

Bugtracker #4415 - fix non-utf-8 wrap

This commit is contained in:
e107steved 2008-05-23 20:29:12 +00:00
parent ec8d2f49a9
commit c954aa4e1b

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
| $Revision: 1.31 $ | $Revision: 1.32 $
| $Date: 2008-03-17 21:01:44 $ | $Date: 2008-05-23 20:29:04 $
| $Author: e107steved $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@ -322,13 +322,13 @@ class e_parse
} }
else else
{ {
for ($i = strlen($matches[1]); $i > 0; $i--) for ($i = min($width,strlen($sp)); $i > 0; $i--)
{ {
if (strpos($lbrks,$matches[1][$i-1]) !== FALSE) break; // No speed advantage to defining match character if (strpos($lbrks,$sp[$i-1]) !== FALSE) break; // No speed advantage to defining match character
} }
if ($i == 0) if ($i == 0)
{ // No 'special' break character found - break at the word boundary { // No 'special' break boundary character found - break at the word boundary
$pulled = $matches[1]; $pulled = substr($sp,0,$width);
} }
else else
{ {