Added support for utf-8 characters in urls for English language pack

This commit is contained in:
khenn 2010-05-04 18:45:10 -05:00
parent 960ff2287c
commit ac7ce44180
2 changed files with 2 additions and 1 deletions

View file

@ -16,7 +16,7 @@ sub makeUrlCompliant {
$value =~ s/^\s+//; #removes leading whitespace
$value =~ s/ /-/g; #replaces whitespace with hyphens
$value =~ s/\.$//; #removes trailing period
$value =~ s/[^A-Za-z0-9\-\.\_\/]//g; #removes all funky characters
$value =~ s/[^\w\-\.\_\/]//g; #removes characters that would interfere with the url
$value =~ s/^\///; #removes a leading /
$value =~ s/\/$//; #removes a trailing /
$value =~ s/\/\//\//g; #removes double /