From 780623368197478037c11599ef1ea2a616e4d11d Mon Sep 17 00:00:00 2001 From: jsatoh Date: Wed, 10 Nov 2010 01:11:47 +0000 Subject: [PATCH] 2010-11-10 Junichi Satoh * lib/PandoraFMS/Tools.pm: Added a parameter of unsafe_chars, '<>&', to encode_entities(). It is support for multibyte characters. If it is not defined, records with multibyte characters on database are destroyed by 'pandora_recode_db.pl'. :( git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3562 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 7 +++++++ pandora_server/lib/PandoraFMS/Tools.pm | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 19e9f5ca0c..5bfcca8624 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,10 @@ +2010-11-10 Junichi Satoh + + * lib/PandoraFMS/Tools.pm: Added a parameter of unsafe_chars, '<>&', + to encode_entities(). It is support for multibyte characters. + If it is not defined, records with multibyte characters on database + are destroyed by 'pandora_recode_db.pl'. :( + 2010-11-08 Sergio Martin * util/pandora_sync_db.pl: Added two special diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 3b7be673af..ef78036368 100644 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -85,7 +85,7 @@ sub pandora_trash_ascii { sub safe_input($) { my $value = shift; - $value = encode_entities ($value); + $value = encode_entities ($value, "<>&"); #//Replace the character '\' for the equivalent html entitie $value =~ s/\\/\/gi;