# -*-perl-*- use strict; use Test::More 'no_plan'; use lib "$ENV{LJHOME}/cgi-bin"; require 'ljlib.pl'; require 'cleanhtml.pl'; use HTMLCleaner; my $post; my $clean = sub { LJ::CleanHTML::clean_event(\$post); }; # plain form $post = "
"; $clean->(); ok($post =~ /(); ok($post !~ /password/, "can't do password element"); $post = "
"; $clean->(); ok($post !~ /PASSWORD/, "can't do password element in uppercase"); # other types $post = "
"; $clean->(); ok($post =~ /foobar/, "can do foobar type"); # bad types $post = "
"; $clean->(); ok($post !~ /some space/, "can't do spaces in input type"); # password input $post = "raw: end"; $clean->(); ok($post !~ /this_is_raw/, "can't do bare input");