diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 05e722f8d..f93c7c32f 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -6,6 +6,9 @@ - fix [ 1173101 ] Template in ^LoginToggle(); - Added a page to the help docs which tells you what Assets are enabled for this site. - Added a new Error Handling / Logging mechanism. + - Whitespace in URLs will now be replaced with hyphens (-) instead of + underscores (_) because there is some evidence that hyphens get better + search index ranking than underscores. 6.5.5 diff --git a/lib/WebGUI/i18n/English.pm b/lib/WebGUI/i18n/English.pm index 398c38c1c..147e9edd8 100644 --- a/lib/WebGUI/i18n/English.pm +++ b/lib/WebGUI/i18n/English.pm @@ -13,7 +13,7 @@ sub makeUrlCompliant { $value =~ s/\s+$//; #removes trailing whitespace $value =~ s/^\s+//; #removes leading whitespace $value =~ s/^\\//; #removes leading slash - $value =~ s/ /_/g; #replaces whitespace with underscores + $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/^\///; #removes a preceeding /