$unsafe_text = ''; $safe_text = safeOutput::escape($unsafe_text, 'text'); echo $safe_text;
$unsafe_html = ''; $safe_html = safeOutput::sanitizeHtml($unsafe_html); echo $safe_html;This will remove any potentially dangerous tags or attributes from the HTML. safeOutput is part of the PHP Tools package which is a collection of libraries and tools for PHP development.