Alexander Nazarov (nfokz) wrote in changelog,
Alexander Nazarov
nfokz
changelog

[livejournal] r21643: LJSV-2152: When comment has embed in it ...

Committer: anazarov
LJSV-2152: When comment has embed in it - bubbles should be above buttons
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2012-04-05 08:30:49 UTC (rev 21642)
+++ trunk/cgi-bin/cleanhtml.pl	2012-04-05 08:55:18 UTC (rev 21643)
@@ -1258,6 +1258,23 @@
                    push @$attrs => 'type' unless grep { $_ eq 'type' } @$attrs;
                 }
 
+                # LJSV-2152: When comment has embed in it - bubbles should be above buttons
+                if ( $tag eq 'iframe' and $hash->{'src'} ) {
+                    foreach my $host (keys %LJ::WHITELIST_VIDEO_HOSTS) {
+                        if ( index $host, $hash->{'src'} ) {
+                            if ( $hash->{'src'} !~ m!wmode=opaque!i ) {
+                                if ( $hash->{'src'} =~ m!\?! ) {
+                                    $hash->{'src'} .= '&wmode=opaque';
+                                } else {
+                                    $hash->{'src'} .= '?wmode=opaque';
+                                }
+                            }
+
+                            last;
+                        }
+                    }
+                }
+
                 # Through the xsl namespace in XML, it is possible to embed scripting lanaguages
                 # as elements which will then be executed by the browser.  Combining this with
                 # customview.cgi makes it very easy for someone to replace their entire journal

Tags: anazarov, livejournal, nfokz, pl
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