Tweak binary string regexp and allow \e (#15)

This commit is contained in:
Nicolas Grekas 2016-06-17 11:04:28 +02:00 committed by Sebastian Bergmann
parent 6e6a2a0b9a
commit 42c4c2eec4
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ class Exporter
if (is_string($value)) {
// Match for most non printable chars somewhat taking multibyte chars into account
if (preg_match('/[\x00-\x08\x0B\x0E-\x1F\x7F]/', $value)) {
if (preg_match('/[^\x09-\x0d\x1b\x20-\xff]/', $value)) {
return 'Binary String: 0x' . bin2hex($value);
}