Skip Menu |
 

This queue is for tickets about the HTML-Scrubber CPAN distribution.

Report information
The Basics
Id: 19063
Status: open
Priority: 0/
Queue: HTML-Scrubber

People
Owner: Nobody in particular
Requestors: sjq [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.08
Fixed in: (no value)



Subject: doesn't support generating valid xhtml
Download (untitled) / with headers
text/plain 378b
I've had a bug reported against the Debian libhtml-scrubber-perl package that I maintain: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=365971 "HTML::Scrubber seems to have no support for generating valid XHTML 1.0 Strict. It converts incoming valid <hr /> to <hr>. Probably the best way to fix this would be to add a config option that turns on using <hr /> and similar."
Download (untitled) / with headers
text/plain 570b
On Thu May 04 03:56:06 2006, guest wrote: Show quoted text
> I've had a bug reported against the Debian libhtml-scrubber-perl package > that I maintain: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=365971 > > "HTML::Scrubber seems to have no support for generating valid XHTML 1.0 > Strict. It converts incoming valid <hr /> to <hr>. Probably the best way > to fix this would be to add a config option that turns on using <hr /> > and similar."
The slash is treated like an attribute, for example see http://search.cpan.org/src/PODMASTER/HTML-Scrubber-0.08/t/07_booleans.t
Download (untitled) / with headers
text/plain 834b
I can't get this to work use HTML::Scrubber; my @allow = qw[ br hr b a option button th style script]; my @default = ( 1, # this determines wthere xhtnl style accepted { '/' => 0, href => 0, } ); my $scrubber = HTML::Scrubber->new( allow => \@allow, default => \@default ); my $html = q[ <style type="text/css"> BAD { background: #666; color: #666;} </style> <script language="javascript"> alert("Hello, I am EVIL!"); </script> <HR> a => <a href=1>link </a> br => <br/> b => <B onclick="hello()"> bold </B> u => <U> UNDERLINE </U> ]; print $scrubber->scrub($html),"\n"; It seems to be the first parameter to @default that determines whether the tailing slash is recognized or not. The '/' attribute seems to be ignored


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.