I have a filter written in perl that looks like this:
my $tf = HTML::TagFilter->new( allow => { img => { src => [] }, b => { all => [] }, i => { all => [] }, em => { all => [] }, u => { all => [] }, s => { all => [] }, }, strip_comments => 1, skip_xss_protection => 1, );
now when i pass html like this
<html> <head> <style><!-- ..hmmessage P { margin:0px=3B padding:0px } body.hmmessage { font-size: 12pt=3B font-family:Calibri } --></style></head> <body class=3D'hmmessage'><div dir=3D'ltr'>Message content here! = </div></body> </html>
output
<!--..hmmessage P{margin:0px;padding:0px}body.hmmessage{font-size: 12pt;font-family:Calibri}-->Message content here
If you look at the result, you will find that the content of the style tag still exists, I donβt know why ?, so can someone tell me why the content of the style tag still exists after passing through the filter?
source share