Committer: akanashin
LJSV-2531: [Posting] Width attribute parsed incorrectlyU trunk/cgi-bin/LJ/EmbedModule.pm
Modified: trunk/cgi-bin/LJ/EmbedModule.pm =================================================================== --- trunk/cgi-bin/LJ/EmbedModule.pm 2013-01-17 12:03:15 UTC (rev 23556) +++ trunk/cgi-bin/LJ/EmbedModule.pm 2013-01-17 13:43:02 UTC (rev 23557) @@ -419,11 +419,11 @@ if ($type eq "S") { my ($elewidth, $eleheight); if ($attr->{width}) { - $elewidth = $attr->{width}+0; + $elewidth = $attr->{width} =~ m/^\d+%$/ ? $attr->{width} : $attr->{width}+0; $width = $elewidth if $elewidth > $width; } if ($attr->{height}) { - $eleheight = $attr->{height}+0; + $eleheight = $attr->{height} =~ m/^\d+%$/ ? $attr->{height} : $attr->{height}+0; $height = $eleheight if $eleheight > $height; } if ($attr->{style}) {