Changeset 2430

Show
Ignore:
Timestamp:
09/02/08 09:24:49 (3 months ago)
Author:
tinyau
Message:

Changed to use unicode mode and Unicode character properties in preg_replace() and MultiByte class. UTF-8 characters should be supported in post slug and tag now.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/classes/utils.php

    r2411 r2430  
    587587        // Convert all characters to lowercase. 
    588588        // Trim spaces on both sides. 
    589         $slug= rtrim( strtolower( preg_replace( '/[^a-z0-9%_\-]+/i', $separator, $string ) ), $separator ); 
     589        $slug= rtrim( MultiByte::strtolower( preg_replace( '/[^\p{L}\p{N}%_\-]+/u', $separator, $string ) ), $separator ); 
    590590 
    591591        // Let people change the behavior.