From a39261588e91b63e094236be5418651779b9c456 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Sun, 27 Oct 2013 00:27:00 +0400 Subject: [PATCH] Fixed bug with strings rendering. 1 now works with different LF 2 fixed the bug with 'empty string' in cases when htmlspecialchars returns empry string --- dBug.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dBug.php b/dBug.php index 4b90a9a..2a015bd 100755 --- a/dBug.php +++ b/dBug.php @@ -236,8 +236,8 @@ class dBug { return; } $length=strlen($var); - $nv=htmlspecialchars($var); - $lines=explode("\n",$nv); + $nv=htmlspecialchars($var,ENT_QUOTES | ENT_SUBSTITUTE,''); + $lines=preg_split('/\R/', $nv); $linesCount=count($lines); if($linesCount==1 && $length<=self::$embeddedStringMaxLength){ $this->renderPrimitiveType('string','string ['.$length.']',$var);