$userInput = $_POST['userInput']; $cleanInput = t3lib_div::removeXSS($userInput);
$userInput = 'Hello, '; $cleanInput = t3lib_div::removeXSS($userInput); echo $cleanInput;In this example, we're using the removeXSS function to escape any potentially dangerous characters in the user input, including the script tag that contains the alert message. The t3lib_div library is part of the TYPO3 CMS, which is an open-source content management system for web development.