Committer: amyshkin
LJSUP-11455: bad view variable mediaplaceholder.loading in russianU trunk/cgi-bin/LJ/S2/EntryPage.pm U trunk/cgi-bin/cleanhtml.pl U trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/LJ/S2/EntryPage.pm =================================================================== --- trunk/cgi-bin/LJ/S2/EntryPage.pm 2012-03-14 08:00:57 UTC (rev 21406) +++ trunk/cgi-bin/LJ/S2/EntryPage.pm 2012-03-14 08:26:37 UTC (rev 21407) @@ -171,6 +171,7 @@ 'video_placeholders' => $replace_video_in_comments, 'remove_img_sizes' => $replace_images_in_comments, 'remove_video_sizes' => $replace_video_in_comments, + 'no_encode' => 1, }); # local time in mysql format to gmtime Modified: trunk/cgi-bin/cleanhtml.pl =================================================================== --- trunk/cgi-bin/cleanhtml.pl 2012-03-14 08:00:57 UTC (rev 21406) +++ trunk/cgi-bin/cleanhtml.pl 2012-03-14 08:26:37 UTC (rev 21407) @@ -1149,11 +1149,6 @@ if ($tag eq "img") { my $img_bad = 0; - if ($opts->{'remove_img_sizes'}) { - delete $hash->{'height'}; - delete $hash->{'width'}; - } - if ($opts->{'extractimages'}) { $img_bad = 1; } # don't use placeholders for small images @@ -1202,7 +1197,7 @@ } if ($img_bad) { - $newdata .= qq~<a class="b-mediaplaceholder b-mediaplaceholder-photo ~ . ( $hash->{'width'} && $hash->{'height'} ? qq~ b-mediaplaceholder-good" style="width:$hash->{'width'}px;height:$hash->{'height'}px;" ~ : '" ' ) . qq~data-href="$href_b_link" href="~ . + $newdata .= qq~<a class="b-mediaplaceholder b-mediaplaceholder-photo ~ . ( $opts->{'remove_img_sizes'} ? '"' : qq~ b-mediaplaceholder-good" style="width:$hash->{'width'}px;height:$hash->{'height'}px;"~ ) . ( $hash->{'width'} ? qq~ data-width="$hash->{'width'}"~ : '' ) . ( $hash->{'height'} ? qq~ data-height="$hash->{'height'}"~: '' ) . qq~data-href="$href_b_link" href="~ . LJ::ehtml($hash->{'src'}) . '" onclick="return LiveJournal.placeholderClick(this, \'image\')">' . '<span class="b-mediaplaceholder-outer">' . '<span class="b-mediaplaceholder-inner">' . Modified: trunk/cgi-bin/weblib.pl =================================================================== --- trunk/cgi-bin/weblib.pl 2012-03-14 08:00:57 UTC (rev 21406) +++ trunk/cgi-bin/weblib.pl 2012-03-14 08:26:37 UTC (rev 21407) @@ -2038,11 +2038,8 @@ $width -= 2; $height -= 2; - $width = undef if $opts{remove_video_sizes}; - $height = undef if $opts{remove_video_sizes}; - return qq { - <a href="$link" class="b-mediaplaceholder b-mediaplaceholder-video } . ( $width && $height ? ' b-mediaplaceholder-good" style="width:' . $width . 'px;height:' . $height . 'px;"' : '" ' ) . qq{ onclick="return LiveJournal.placeholderClick(this, '$placeholder_html')"> + <a href="$link" class="b-mediaplaceholder b-mediaplaceholder-video } . ( $opts{remove_video_sizes} ? '" ' : ' b-mediaplaceholder-good" style="width:' . $width . 'px;height:' . $height . 'px;"' ) . ( $width ? qq~ data-width="$width"~ : '' ) . ( $height ? qq~ data-height="$height"~: '' ) . qq{ onclick="return LiveJournal.placeholderClick(this, '$placeholder_html')"> <span class="b-mediaplaceholder-outer"> <span class="b-mediaplaceholder-inner"> <i class="b-mediaplaceholder-pic"></i>