From 33c88ef2f8463266d6b5c12211d2089f684b7411 Mon Sep 17 00:00:00 2001 From: tomolimo Date: Wed, 3 Jul 2019 08:51:56 +0200 Subject: [PATCH] Fixes typo --- README.md | 10 ++++++++-- hook.php | 8 +++++--- setup.php | 2 +- ticketcleaner.xml | 4 ++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 18ae15c..0257ba8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ New home for Ticket Cleaner GLPi plugin Currently mirrors https://forge.glpi-project.org/projects/ticketcleaner -# Release 2.1.0 +## 2.1.0 Beware that, when upgrading from a version lower than 2.0.0, this new release will not keep your existing filters. You'll have to input them again with the new interface that permits to edit them directly into GLPi. Your former filters will be copied into a backup table that you may edit via your preferred mySQL query editor (table name is `backup_glpi_plugin_ticketcleaner_filters`). You'll have to combine your former filters to get the new ones that will be entered into the new table, or to create new one from scratch. @@ -36,5 +36,11 @@ Remove functions for 9.1 compatibility ## 2.3.3 Fixed issue with the \r\n +## 2.3.4 +Typo fix + ## 2.4.0 -Compatibility with GLPI 9.4 +Compatibility with GLPI 9.3 + +## 2.4.1 +Typo fix diff --git a/hook.php b/hook.php index 485bb1a..40e6672 100644 --- a/hook.php +++ b/hook.php @@ -220,11 +220,13 @@ public static function cleanText($parm) { if ($is_content && isset($filters[ PluginTicketcleanerFilter::DESCRIPTION_TYPE ])) { $temp_content = $parm->input['content']; - + if (isset($_SESSION['glpi_use_mode']) && ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE)) { + Toolbox::logInFile('TicketCleaner', "\tInitial text content: " . $temp_content . "\n" ); + } //////////////////// // GLPI fixes // cases of the \r\n or \n for GLPI 9.2, and what about GLPI 9.3? - $temp_content = preg_replace('/(\\\\r)?\\\\n/', ';,
', $temp_content); + $temp_content = preg_replace('/(\\\\r)?\\\\n/', '
', $temp_content); // cases of the " that are converted into '; instead of " in GLPI 9.2, 9.3 and 9.4 $temp_content = str_replace('\\\';', '\\"', $temp_content); @@ -237,7 +239,7 @@ public static function cleanText($parm) { $temp_content = Toolbox::unclean_cross_side_scripting_deep($temp_content); $temp_content = Toolbox::stripslashes_deep($temp_content); if (isset($_SESSION['glpi_use_mode']) && ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE)) { - Toolbox::logInFile('TicketCleaner', "\tInitial text content: " . $temp_content . "\n" ); + Toolbox::logInFile('TicketCleaner', "\tText content after un-sanitize: " . $temp_content . "\n" ); } foreach ($filters[ PluginTicketcleanerFilter::DESCRIPTION_TYPE ] as $ptn) { $temp_content = preg_replace( $ptn['regex'], $ptn['replacement'], $temp_content ); diff --git a/setup.php b/setup.php index 0c755b7..24f555e 100644 --- a/setup.php +++ b/setup.php @@ -8,7 +8,7 @@ // and it cleans attached pictures to emails // It has been succesfully tested with plain TEXT and HTML emails // ---------------------------------------------------------------------- -define ("PLUGIN_TICKETCLEANER_VERSION", "2.4.0"); +define ("PLUGIN_TICKETCLEANER_VERSION", "2.4.1"); /** * Summary of plugin_init_ticketcleaner diff --git a/ticketcleaner.xml b/ticketcleaner.xml index 5ad0ddb..c29241c 100644 --- a/ticketcleaner.xml +++ b/ticketcleaner.xml @@ -53,11 +53,11 @@ This plugin adds the possibility to translate it 'inline', see wiki.]]> 9.1 - 2.3.3 + 2.3.4 9.2 - 2.4.0 + 2.4.1 9.3