Permalink
Browse files

Made Lang::createFileName() a little stricter to avoid to avoid probl…

…ems on some servers.
  • Loading branch information...
1 parent 3b73c6a commit 78ad983198c2ac832de5b382917cf253a2fbec50 @pointybeard pointybeard committed Mar 18, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 symphony/lib/toolkit/class.lang.php
@@ -235,18 +235,18 @@ public static function createHandle($string, $max_length=255, $delim='-', $urien
* @param string $delim replacement for invalid characters
* @param boolean $apply_transliteration if true, umlauts and special characters will be substituted
* @return string created filename
- */
+ */
public static function createFilename($string, $delim = '-', $apply_transliteration = true) {
// Use the transliteration table if provided
if($apply_transliteration) $string = _t($string);
// Strip out any tag
- $string = strip_tags($string);
+ $string = strip_tags($string);
// Find all legal characters
- preg_match_all('/[\p{L}\w:;.,+=~]+/u', $string, $matches);
-
+ preg_match_all('/[\w:;.,+=~]+/', $string, $matches);
+
// Join only legal character with the $delim
$string = implode($delim, $matches[0]);

0 comments on commit 78ad983

Please sign in to comment.