Make makeUrlCompliant as deprecated, and updated POD and subroutines accordingly.
This commit is contained in:
parent
1aaac5fbfb
commit
944c76040a
5 changed files with 5 additions and 17 deletions
|
|
@ -1024,7 +1024,6 @@ Couldn't open %-s because %-s <br />
|
|||
<dd>The new URL will be based on the Asset's present URL.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>New URLs will be passed through the makeUrlCompliant function that is specific to the default language for your site.</p>
|
||||
|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue