Committer: amyshkin
LJSUP-10691: Image placeholders in commentsU trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl =================================================================== --- trunk/cgi-bin/cleanhtml.pl 2012-03-06 06:04:45 UTC (rev 21300) +++ trunk/cgi-bin/cleanhtml.pl 2012-03-06 06:18:25 UTC (rev 21301) @@ -1128,15 +1128,20 @@ # don't use placeholders for small images if ($opts->{'img_placeholders'}) { - if ( $hash->{'width'} > 140 ) { + if ( !defined $hash->{width} || ! defined $hash->{height} ) { $img_bad = 1; } else { - if ( $hash->{'height'} > 37 ) { + if ( $hash->{'width'} > 140 ) { $img_bad = 1; } else { - $img_bad = 0; + if ( $hash->{'height'} > 37 ) { + $img_bad = 1; + } + else { + $img_bad = 0; + } } } }