Skip to content

Commit cfa1c89

Browse files
committed
code_samples_usage_diff2html.php: escape < and >
1 parent da094da commit cfa1c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/code_samples/code_samples_usage_diff2html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
continue;
3434
}
3535
$statusChar = strlen($diffLine) ? $diffLine[0] : '';
36-
$realLine = $str = substr($diffLine, 1);
36+
$realLine = str_replace(['<', '>'], ['&lt;', '&gt;'], substr($diffLine, 1));
3737
if ($previousStatusChar !== $statusChar) {
3838
switch ("$previousStatusChar$statusChar") {
3939
case ' +':

0 commit comments

Comments
 (0)