Skip to content

Commit 71ae02c

Browse files
radiat-rsebastianbergmann
authored andcommitted
Fix #2256 Invalid utf8 causing partially missing output
Added ENT_SUBSTITUTE parameter to htmlspecialchars in Printer->write
1 parent bf9b0e9 commit 71ae02c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Util/Printer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function write($buffer)
128128
}
129129
} else {
130130
if (PHP_SAPI != 'cli' && PHP_SAPI != 'phpdbg') {
131-
$buffer = htmlspecialchars($buffer);
131+
$buffer = htmlspecialchars($buffer, ENT_SUBSTITUTE);
132132
}
133133

134134
print $buffer;

0 commit comments

Comments
 (0)