From 40259bb63f20cde677348080e430f379dd9054aa Mon Sep 17 00:00:00 2001 From: gvzdus <> Date: Sat, 8 Jan 2022 09:28:37 +0000 Subject: [PATCH] 47_OBIS: Remove ctrl characters in strings git-svn-id: https://svn.fhem.de/fhem/trunk@25436 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/47_OBIS.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/fhem/CHANGED b/fhem/CHANGED index 746e442ca..78ee0c24e 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 47_OBIS: remove control characters in strings - feature: 10_KNX: KNX_scan Utility function - bugfix: 82_LGTV_WebOS: rewrite and change code, fix bugs of older version - bugfix: 88_HMCCU: Bugfixes and improvements diff --git a/fhem/FHEM/47_OBIS.pm b/fhem/FHEM/47_OBIS.pm index 0332c76c2..7db4b7915 100644 --- a/fhem/FHEM/47_OBIS.pm +++ b/fhem/FHEM/47_OBIS.pm @@ -410,6 +410,7 @@ sub OBIS_Parse_List $str=$SML_specialities{"HEX2"}[1]->($str) } else { $str=~s/([A-F0-9]{2})/chr(hex($1))/eg; + $str=~s/[[:cntrl:]]//g; $str=~s/[^!-~\s\r\n\t]//g; } }