add extra collateral for DateTime tests
This commit is contained in:
parent
b14c3983a9
commit
febc052d97
1 changed files with 25 additions and 0 deletions
25
t/supporting_collateral/BadLocale.pm
Normal file
25
t/supporting_collateral/BadLocale.pm
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
package WebGUI::i18n::BadLocale;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
|
||||||
|
our $LANGUAGE = {
|
||||||
|
label => 'BadLocale',
|
||||||
|
toolbar => 'bullet',
|
||||||
|
};
|
||||||
|
|
||||||
|
sub makeUrlCompliant {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue