Skip to content
Snippets Groups Projects
Commit 4211022e authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

drop unused code

parent 9d1ae10c
No related branches found
No related tags found
No related merge requests found
......@@ -180,36 +180,6 @@ sub qencode {
);
}
## usefull to pass parameters to TT2
sub encode_utf8 ($) {
my ($string) = @_;
$string = '' unless $string;
return Encode::encode('utf8', $string);
}
## Escape characters that may interfer in an XML document
sub escape_xml {
my ($s) = @_;
$s =~ s/\&/&amp\;/gm;
$s =~ s/\"/&quot\;/gm;
$s =~ s/\</&lt\;/gm;
$s =~ s/\>/&gt\;/gm;
$s =~ s/\'/&#039;/gm;
return $s;
}
## usefull to pass parameters to TT2
sub escape_quotes {
my ($string) = @_;
$string =~ s/\'/\\\'/g;
return $string;
}
1;
__END__
......
......@@ -12,7 +12,6 @@ use IdPAccountManager::Data::AuthenticationToken;
use IdPAccountManager::Data::ServiceProvider;
use IdPAccountManager::Logger;
use IdPAccountManager::SAMLMetadata;
use IdPAccountManager::Tools;
## Defining parameters format
my $urn_or_url_regex = '(http(s?):\/\/|urn:)[^\\\$\*\"\'\`\^\|\<\>\n\s]+'
......@@ -174,12 +173,6 @@ sub respond {
my $tt2 = Template->new(
{
ENCODING => 'iso-8859-1', ## le défaut apparemment
FILTERS => {
encode_utf8 =>
[ \&IdPAccountManager::Tools::encode_utf8, 0 ],
escape_quotes =>
[ \&IdPAccountManager::Tools::escape_quotes, 0 ]
},
INCLUDE_PATH => $self->{configuration}->{templates_dir}
}
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment