[pLog-svn] r5393 - plog/branches/lifetype-1.2/class/template/smarty/plugins

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Fri May 11 02:50:06 EDT 2007


Author: jondaley
Date: 2007-05-11 02:50:06 -0400 (Fri, 11 May 2007)
New Revision: 5393

Modified:
   plog/branches/lifetype-1.2/class/template/smarty/plugins/modifier.utf8_wordwrap.php
Log:
If someone types in an accented character, the word wrap breaks for me.  Mark - does this break stuff for you, I think it might.  The problem is that there could be an 8bit ascii character that isn't UTF-8, or whatever stuff you are trying to find.  The while loop with a strlen of 0, until the while_what expires, and then it pastes the rest of the text in without word wraps

Modified: plog/branches/lifetype-1.2/class/template/smarty/plugins/modifier.utf8_wordwrap.php
===================================================================
--- plog/branches/lifetype-1.2/class/template/smarty/plugins/modifier.utf8_wordwrap.php	2007-05-11 04:12:20 UTC (rev 5392)
+++ plog/branches/lifetype-1.2/class/template/smarty/plugins/modifier.utf8_wordwrap.php	2007-05-11 06:50:06 UTC (rev 5393)
@@ -39,7 +39,7 @@
     if(!$cut){ 
         $regexp = '#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){'.$width.',}\b#U'; 
     } else { 
-        $regexp = '#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){'.$width.'}#'; 
+        $regexp = '#^(?:[\x00-\xFF]|[\xC0-\xFF][\x80-\xBF]+){'.$width.'}#'; 
     } 
     if(function_exists('mb_strlen')){ 
         $str_len = mb_strlen($str,'UTF-8'); 



More information about the pLog-svn mailing list