Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r19224: LJSUP-8979 (Need to block ebeded tags of...

Committer: ailyin
LJSUP-8979 (Need to block ebeded tags of social nexworks pluggins)
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2011-06-03 07:59:59 UTC (rev 19223)
+++ trunk/cgi-bin/cleanhtml.pl	2011-06-03 08:13:17 UTC (rev 19224)
@@ -517,7 +517,7 @@
             # Try to execute default action on undefined tags
             next if (!$action{$tag} && $undefined_tags eq "eat");
 
-            if ($action{$tag} eq "eat") {
+            if ( $action{$tag} eq "eat" || $tag =~ /^fb|g:/ ) {
                 $p->unget_token($token);
                 $p->get_tag("/$tag");
                 next;
@@ -1766,7 +1766,7 @@
             my $attrs = $token->[3]; # attribute names, in original order
 
             ## check the tag
-            if ( $tag eq 'script' || $tag =~ /^(?:g|fb):/ ) {
+            if ($tag eq 'script') {
                 $p->get_tag("/$tag");
                 next TOKEN;
             }

Tags: andy, livejournal, 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