nyx/tests/dynamic_fixtures/php/xss_negative.php
2026-06-05 10:16:30 -05:00

10 lines
327 B
PHP

<?php
// XSS — negative fixture.
// Safe: uses htmlspecialchars() before output.
// Entry: renderPage($userInput) Cap: HTML_ESCAPE
// Expected verdict: NotConfirmed
function renderPage($userInput) {
$safe = htmlspecialchars($userInput, ENT_QUOTES, 'UTF-8');
echo '<html><body>' . $safe . '</body></html>' . "\n";
}