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

[livejournal] r21621: LJSUP-11564: Placeholder viewed incorrec...

Committer: amyshkin
LJSUP-11564: Placeholder viewed incorrect if user insert only i size
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2012-04-02 11:27:39 UTC (rev 21620)
+++ trunk/cgi-bin/cleanhtml.pl	2012-04-02 12:39:36 UTC (rev 21621)
@@ -1153,11 +1153,11 @@
                     # don't use placeholders for small images
                     if ( $opts->{'img_placeholders'} ) {
                         if ( exists $hash->{style} ) {
-                            if ( $hash->{style} =~ /width\:\s*(\d+)(?:px)?\;/i ) {
+                            if ( $hash->{style} =~ /[^\-]width\:\s*(\d+)(?:px)?\;/i ) {
                                 $hash->{width} = $1;
                             }
 
-                            if ( $hash->{style} =~ /height\:\s*(\d+)(?:px)?\;/i ) {
+                            if ( $hash->{style} =~ /[^\-]height\:\s*(\d+)(?:px)?\;/i ) {
                                 $hash->{height} = $1;
                             }
                         }

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