diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 76bdf36c1..e3c253b67 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -4,6 +4,7 @@ - fixed #12102: User profiling field extras information - fixed #12106: CalendarUpdateFeeds activity does not handle time zones correctly - fixed #11213: Gooey on the Go format problem + - mark makeUrlCompliant as deprecated. 7.10.14 - fixed #12094: Cannot enter in Macros in URLs inside TinyMCE. diff --git a/lib/WebGUI/International.pm b/lib/WebGUI/International.pm index 942517db0..473625896 100644 --- a/lib/WebGUI/International.pm +++ b/lib/WebGUI/International.pm @@ -36,8 +36,6 @@ This package provides an interface to the internationalization system. $string = $i->get($internationalId); $string = $i->get($internationalId, $otherNamespace); - $url = $i->makeUrlCompliant($url); - $hashRef = $i->getLanguage($lang); $hashRef = $i->getLanguages(); @@ -218,6 +216,8 @@ sub getLanguages { =head2 makeUrlCompliant ( url [ , language ] ) +THIS METHOD IS DEPRECATED AND WILL BE REMOVED FROM WEBGUI. + Manipulates a URL to make sure it will work on the internet. It removes things like non-latin characters, etc. =head3 url @@ -232,11 +232,7 @@ Specify a default language. Defaults to user preference or "English". sub makeUrlCompliant { my ($self, $url, $language) = @_; - $language = $language || $self->{_language} || $self->session->user->profileField("language") || "English"; - my $cmd = "WebGUI::i18n::".$language; - WebGUI::Pluggable::load($cmd); - my $output = WebGUI::Pluggable::run($cmd, 'makeUrlCompliant', [$url]); - return $output; + return $url; } diff --git a/lib/WebGUI/Session/Url.pm b/lib/WebGUI/Session/Url.pm index 628055fa7..dd4aec50a 100644 --- a/lib/WebGUI/Session/Url.pm +++ b/lib/WebGUI/Session/Url.pm @@ -391,7 +391,7 @@ sub makeAbsolute { =head2 makeCompliant ( string ) -Returns a string that has made into a WebGUI compliant URL based upon the language being submitted. +Returns a string that has been made into a WebGUI compliant URL. =head3 string diff --git a/lib/WebGUI/i18n/English/Asset.pm b/lib/WebGUI/i18n/English/Asset.pm index 7ee513e38..319a2ca3d 100644 --- a/lib/WebGUI/i18n/English/Asset.pm +++ b/lib/WebGUI/i18n/English/Asset.pm @@ -1024,7 +1024,6 @@ Couldn't open %-s because %-s
The new URL will be based on the Asset's present URL.
-

New URLs will be passed through the makeUrlCompliant function that is specific to the default language for your site.

|, lastUpdated => 0, }, diff --git a/lib/WebGUI/i18n/_language.skeleton b/lib/WebGUI/i18n/_language.skeleton index ea763a9d8..65f70c43a 100644 --- a/lib/WebGUI/i18n/_language.skeleton +++ b/lib/WebGUI/i18n/_language.skeleton @@ -12,14 +12,6 @@ our $LANGUAGE = { sub makeUrlCompliant { # you have to have this method, but it can do URL transcoding for your language my $value = shift; - $value =~ s/\s+$//; #removes trailing whitespace - $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/^\///; #removes a leading / - $value =~ s/\/$//; #removes a trailing / - $value =~ s/\/\//\//g; #removes double / return $value; }