From ec507ea2f9d6083ad0ae4bf9bbc651b8814bcde6 Mon Sep 17 00:00:00 2001 From: Lars Moelleken Date: Wed, 29 Jun 2016 13:17:37 +0200 Subject: [PATCH] [+]: use the "UTF8"-Class + polyfills v2 --- src/kint/inc/KintParser.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/kint/inc/KintParser.php b/src/kint/inc/KintParser.php index 8232836d..c5776571 100644 --- a/src/kint/inc/KintParser.php +++ b/src/kint/inc/KintParser.php @@ -639,9 +639,12 @@ public static function escape(&$value, $encoding = null) $value = htmlspecialchars($value, ENT_NOQUOTES, $encoding === 'ASCII' ? 'UTF-8' : $encoding); + // TODO: we could make the symbols hover-title show the code for the invisible symbol - # when possible force invisible characters to have some sort of display (experimental) - $value = UTF8::remove_invisible_characters($value, '?'); + if ($encoding === 'UTF-8') { + # when possible force invisible characters to have some sort of display (experimental) + $value = UTF8::remove_invisible_characters($value, false, '?'); + } # this call converts all non-ASCII characters into html chars of format $value = UTF8::html_encode($value, true, $encoding);