Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[livejournal] r21297: LJSUP-10691: Image placeholders in comme...

Committer: amyshkin
LJSUP-10691: Image placeholders in comments
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2012-03-05 13:36:29 UTC (rev 21296)
+++ trunk/cgi-bin/cleanhtml.pl	2012-03-05 13:37:22 UTC (rev 21297)
@@ -1128,9 +1128,20 @@
 
                     # don't use placeholders for small images
                     if ($opts->{'img_placeholders'}) { $img_bad = 1; }
-                    if ( $opts->{'img_placeholders'} && defined $hash->{'width'} && $hash->{'width'} > 140 ) { $img_bad = 1; }
-                    if ( $opts->{'img_placeholders'} && defined $hash->{'height'} && $hash->{'height'} > 37 ) { $img_bad = 1; }
+                    if ( $opts->{'img_placeholders'} && defined $hash->{'width'} && $hash->{'width'} > 140 ) {
+                        $img_bad = 1;
+                    }
+                    else {
+                        $img_bad = 0;
+                    }
 
+                    if ( $opts->{'img_placeholders'} && defined $hash->{'height'} && $hash->{'height'} > 37 ) {
+                        $img_bad = 1;
+                    }
+                    else {
+                        $img_bad = 0;
+                    }
+
                     ## Option 'allowed_img_attrs' provides a list of allowed attributes
                     if (my $allowed = $opts->{'allowed_img_attrs'}){
                         while (my ($attr, undef) = each %$hash){

Tags: amyshkin, livejournal, pl, zilogic
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments