HTML sanitization: Difference between revisions

Content deleted Content added
No edit summary
Added suggestion to use PHP htmlspecialchars()
Line 5:
Tags often allowed are <nowiki><b></nowiki>, <nowiki><i></nowiki>, <nowiki><u></nowiki>, <nowiki><em></nowiki>, and <nowiki><strong></nowiki>.
 
In [[PHP]] this can be performed using the <code>strip_tags()</code> functionor <code>htmlspecialchars()</code> functions.<ref>http://www.php.net/strip_tags</ref><ref>http://php.net/manual/en/function.htmlspecialchars.php</ref>
 
In [[Java (programming language)|Java]] this can be achieved by using [[OWASP]] Java HTML Sanitizer Project <ref>https://www.owasp.org/index.php/OWASP_Java_HTML_Sanitizer_Project</ref>