NAME HTML::StripTags - Strip HTML or XML tags from a string with Perl like PHP's strip_tags() does SYNOPSIS use HTML::StripTags qw(strip_tags); $string = 'Hallo beautiful world!'; $allowed_tags = ''; print strip_tags( $string, $allowed_tags ); DESCRIPTION HTML::StripTags provides the function strip_tags() that can strip all HTML or XML tags from a string except the given allowed tags. This is a Perl port of the PHP function strip_tags() based on PHP 5.3.3. SECURITY NOTE Please note: As per PHP's strip_tags() is a very basic and unsafe method, so it's strongly recommended not to use it for cleaning up user input! As HTML::StripTags uses the same state machine, the same applies to this module. METHODS strip_tags() A simple little state-machine to strip out html and php tags State 0 is the output state, state 1 means we are inside a normal html tag, state 2 means we are inside a php tag, state 3 means we are inside a "