[livejournal] r18672: LJSUP-8048: Friends Times prototype 2.
Committer: vsukhanov
LJSUP-8048: Friends Times prototype 2.U trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl 2011-03-22 11:01:41 UTC (rev 18671)
+++ trunk/cgi-bin/cleanhtml.pl 2011-03-22 11:18:40 UTC (rev 18672)
@@ -154,6 +154,7 @@
my $remove_positioning = $opts->{'remove_positioning'} || 0;
my $target = $opts->{'target'} || '';
my $ljrepost_allowed = ($opts->{ljrepost_allowed} && ! $opts->{'textonly'}) || 0;
+ my $opt_no_img_wh = $opts->{img_no_wh};
my $viewer_lang = $opts->{'viewer_lang'};
unless ($viewer_lang) {
@@ -760,6 +761,11 @@
}
}
+ if ($tag eq 'img' and $opt_no_img_wh and $attr =~ /^width|height$/){
+ ## remove width and height attributes from img tag
+ delete $hash->{$attr};
+ }
+
## warning: in commets left by anonymous users, <img src="something">
## is replaced by <a href="something"> (see 'extractimages' param)
## If "something" is "data:<script ...", we'll get a vulnerability
