HTML sanitization: Difference between revisions

Content deleted Content added
Added text
Added text
Line 1:
{{Orphan|date=December 2009}}
{{Unreferenced|date=December 2009}}
 
'''HTML sanitization''' is the process of examining an HTML document and producing a new HTML document that preserves only whatever tags are designated "safe". HTML sanitization can be used to protect against [[cross-site scripting]] and [[SQL injection]] attacks by sanitizing any HTML code submitted by a user.
 
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> function.<ref>http://www.php.net/strip_tags</ref>
 
== References ==
{{Reflist}}
 
[[Category:HTML]]