2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-10 08:04:00 +00:00

Escape characters 0-31. Checked by Martin

git-svn-id: https://svn.fhem.de/fhem/trunk@1528 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-05-03 06:35:53 +00:00
parent f83eacdd0a
commit 1965c7c5bb

View File

@ -30,8 +30,10 @@ XmlEscape($)
$a =~ s/"/"/g;
$a =~ s/</&lt;/g;
$a =~ s/>/&gt;/g;
# Not needed since we've gone UTF-8
# $a =~ s/([^ -~])/sprintf("&#%02x;", ord($1))/ge;
# Not needed since we've gone UTF-8
# $a =~ s/([^ -~])/sprintf("&#%02x;", ord($1))/ge;
# Esacape characters 0-31, as they are not part of UTF-8
$a =~ s/(\x00-\x19)//g;
return $a;
}