Yesterday I found a bug in the scoop html parsing code. It's a strange bug, and could possibly be exploited to post some naughty html code, so I'm interested in fixing it.
Plus it's a pain in the bum.
If you've got a HTML tag like this
The html validation will fail. The parser falls over at empty attributes.
Now somewhere in that horrible regexp, there is a + that needs changing to a *, but I don't fancy trying to fix it on the live server and I won't have time to test it on a test site until sometime over the weekend.
Can anybody spot the problem straight away?
Plus it's a pain in the bum.
If you've got a HTML tag like this
<img alt="" src="/images/a.jpg" />The html validation will fail. The parser falls over at empty attributes.
while ($rest =~ /\s*(?:(\S+?)\s*=\s*(?:"+([^"]+)"+|'+([^']+)'+|([^'"\s]+)\S*)|(\S+)(?!=))\s*/g) {
my $k = $1 || $5; # because of the way parenthesis are used in the
my $v = $2 || $3 || $4; # regexp, these can be in a couple different
$args{lc $k} = $v; # places. it might be fixable, but it's no big deal
}
Now somewhere in that horrible regexp, there is a + that needs changing to a *, but I don't fancy trying to fix it on the live server and I won't have time to test it on a test site until sometime over the weekend.
Can anybody spot the problem straight away?
| < Cynicism | Just chillin'. > |

