Subject: | CSS (and likely other) links match double-quote only |
When parsing CSS links using single quotes, the parser breaks and does
not include the files properly. I believe it affects other places but I
haven't tested them. Tested with v1.23.
The attached patch fixes CSS inclusion with such links, tested on Nagios
status.cgi pages.
Thanks
Subject: | MIME_Lite_HTML-1.23.patch |
--- /usr/lib/perl5/site_perl/5.8.8/MIME/Lite/HTML.pm~bak 2008-10-14 02:33:40.000000000 -0700
+++ /usr/lib/perl5/site_perl/5.8.8/MIME/Lite/HTML.pm 2009-12-18 12:06:20.000000000 -0800
@@ -514,7 +514,7 @@
sub include_css(\%$$) {
my ($self,$gabarit,$root)=@_;
$gabarit=~s/<link ([^<>]*?)
- href\s*=\s*"?([^\" ]*)"?([^>]*)>
+ href\s*=\s*["']?([^\"\' ]*)["']?([^>]*)>
/$self->pattern_css($2,$1,$3,$root)/iegmx;
print "Done CSS\n" if ($self->{_DEBUG});