File tree Expand file tree Collapse file tree 5 files changed +5
-17
lines changed
Expand file tree Collapse file tree 5 files changed +5
-17
lines changed Original file line number Diff line number Diff line change 44 - fixed #12102: User profiling field extras information
55 - fixed #12106: CalendarUpdateFeeds activity does not handle time zones correctly
66 - fixed #11213: Gooey on the Go format problem
7+ - mark makeUrlCompliant as deprecated.
78
897.10.14
910 - fixed #12094: Cannot enter in Macros in URLs inside TinyMCE.
Original file line number Diff line number Diff line change @@ -36,8 +36,6 @@ This package provides an interface to the internationalization system.
3636 $string = $i->get($internationalId);
3737 $string = $i->get($internationalId, $otherNamespace);
3838
39- $url = $i->makeUrlCompliant($url);
40-
4139 $hashRef = $i->getLanguage($lang);
4240
4341 $hashRef = $i->getLanguages();
@@ -218,6 +216,8 @@ sub getLanguages {
218216
219217=head2 makeUrlCompliant ( url [ , language ] )
220218
219+ THIS METHOD IS DEPRECATED AND WILL BE REMOVED FROM WEBGUI.
220+
221221Manipulates a URL to make sure it will work on the internet. It removes things like non-latin characters, etc.
222222
223223=head3 url
@@ -232,11 +232,7 @@ Specify a default language. Defaults to user preference or "English".
232232
233233sub makeUrlCompliant {
234234 my ($self , $url , $language ) = @_ ;
235- $language = $language || $self -> {_language } || $self -> session-> user-> profileField(" language" ) || " English" ;
236- my $cmd = " WebGUI::i18n::" .$language ;
237- WebGUI::Pluggable::load($cmd );
238- my $output = WebGUI::Pluggable::run($cmd , ' makeUrlCompliant' , [$url ]);
239- return $output ;
235+ return $url ;
240236}
241237
242238
Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ sub makeAbsolute {
391391
392392=head2 makeCompliant ( string )
393393
394- Returns a string that has made into a WebGUI compliant URL based upon the language being submitted .
394+ Returns a string that has been made into a WebGUI compliant URL.
395395
396396=head3 string
397397
Original file line number Diff line number Diff line change @@ -1024,7 +1024,6 @@ Couldn't open %-s because %-s <br />
10241024<dd>The new URL will be based on the Asset's present URL.</dd>
10251025</dl>
10261026</div>
1027- <p>New URLs will be passed through the makeUrlCompliant function that is specific to the default language for your site.</p>
10281027| ,
10291028 lastUpdated => 0,
10301029 },
Original file line number Diff line number Diff line change @@ -12,14 +12,6 @@ our $LANGUAGE = {
1212
1313sub makeUrlCompliant { # you have to have this method, but it can do URL transcoding for your language
1414 my $value = shift;
15- $value =~ s/\s+$//; #removes trailing whitespace
16- $value =~ s/^\s+//; #removes leading whitespace
17- $value =~ s/ /-/g; #replaces whitespace with hyphens
18- $value =~ s/\.$//; #removes trailing period
19- $value =~ s/[^A-Za-z0-9\-\.\_\/]//g; #removes all funky characters
20- $value =~ s/^\///; #removes a leading /
21- $value =~ s/\/$//; #removes a trailing /
22- $value =~ s/\/\//\//g; #removes double /
2315 return $value;
2416}
2517
You can’t perform that action at this time.
0 commit comments