From 4211022e99c3ad849e8fc52cdf942dcd05f43ae7 Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Mon, 6 Nov 2017 16:39:18 +0100
Subject: [PATCH] drop unused code

---
 lib/IdPAccountManager/Tools.pm      | 30 -----------------------------
 lib/IdPAccountManager/WebRequest.pm |  7 -------
 2 files changed, 37 deletions(-)

diff --git a/lib/IdPAccountManager/Tools.pm b/lib/IdPAccountManager/Tools.pm
index b069192..e77bcb5 100644
--- a/lib/IdPAccountManager/Tools.pm
+++ b/lib/IdPAccountManager/Tools.pm
@@ -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__
 
diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm
index ad5ff28..deb02ef 100755
--- a/lib/IdPAccountManager/WebRequest.pm
+++ b/lib/IdPAccountManager/WebRequest.pm
@@ -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}
         }
     );
-- 
GitLab