Skip to content

Commit

Permalink
Prevent HTML injection (#812)
Browse files Browse the repository at this point in the history
* Prevent HTML injection

* Update cnb.yaml

---------

Co-authored-by: Deeka Wong <[email protected]>
  • Loading branch information
huangdijia and huangdijia authored Dec 23, 2024
1 parent 2cf898b commit 81052f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tinker.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ protected function cleanOutput(string $output): string
// Remove ANSI color codes
$output = preg_replace('/\e\[[0-9;]*m/', '', $output);

return trim($output);
return htmlentities($output);
}
}

0 comments on commit 81052f2

Please sign in to comment.