Skip to content

Commit

Permalink
code_samples_usage_diff2html.php: escape < and >
Browse files Browse the repository at this point in the history
  • Loading branch information
adriendupuis committed Nov 15, 2024
1 parent da094da commit cfa1c89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/code_samples/code_samples_usage_diff2html.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
continue;
}
$statusChar = strlen($diffLine) ? $diffLine[0] : '';
$realLine = $str = substr($diffLine, 1);
$realLine = str_replace(['<', '>'], ['&lt;', '&gt;'], substr($diffLine, 1));
if ($previousStatusChar !== $statusChar) {
switch ("$previousStatusChar$statusChar") {
case ' +':
Expand Down

0 comments on commit cfa1c89

Please sign in to comment.