Skip to content

Commit

Permalink
[+]: use the "UTF8"-Class + polyfills v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Moelleken committed Jun 29, 2016
1 parent 5d50020 commit ec507ea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/kint/inc/KintParser.php
Expand Up @@ -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);
Expand Down

0 comments on commit ec507ea

Please sign in to comment.