Skip to content

Commit

Permalink
Remove colon as allowed URL character on non-unicode systems
Browse files Browse the repository at this point in the history
  • Loading branch information
linc committed Dec 3, 2012
1 parent 40cee1d commit a40d4f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/class.format.php
Expand Up @@ -1420,7 +1420,7 @@ public static function Url($Mixed) {
$Mixed = trim($Mixed);
$Mixed = strip_tags(html_entity_decode($Mixed, ENT_COMPAT, 'UTF-8'));
$Mixed = strtr($Mixed, self::$_UrlTranslations);
$Mixed = preg_replace('/([^\w\d_:])/', ' ', $Mixed); // get rid of punctuation and symbols
$Mixed = preg_replace('/([^\w\d_])/', ' ', $Mixed); // get rid of punctuation and symbols
$Mixed = str_replace(' ', '-', trim($Mixed)); // get rid of spaces
$Mixed = preg_replace('/-+/', '-', $Mixed); // limit to 1 hyphen at a time
$Mixed = urlencode(strtolower($Mixed));
Expand Down

0 comments on commit a40d4f6

Please sign in to comment.