Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[livejournal] r21734: LJSUP-11810: Change the widget trava.ru

Committer: amyshkin
LJSUP-11810: Change the widget trava.ru
U   trunk/cgi-bin/LJ/S2.pm
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/LJ/S2.pm
===================================================================
--- trunk/cgi-bin/LJ/S2.pm	2012-04-17 13:23:12 UTC (rev 21733)
+++ trunk/cgi-bin/LJ/S2.pm	2012-04-17 13:35:04 UTC (rev 21734)
@@ -1989,7 +1989,7 @@
     my $p = $arg->{'props'};
     if ($p->{'current_music'}) {
         $e->{'metadata'}->{'music'} = LJ::Setting::Music::format_current_music_string($p->{'current_music'});
-        LJ::CleanHTML::clean_subject(\$e->{'metadata'}->{'music'});
+        LJ::CleanHTML::clean_subject(\$e->{'metadata'}->{'music'}, { 'ignore_lj_music' => 1 });
     }
     if (my $mid = $p->{'current_moodid'}) {
         my $theme = defined $arg->{'moodthemeid'} ? $arg->{'moodthemeid'} : $u->{'moodthemeid'};

Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2012-04-17 13:23:12 UTC (rev 21733)
+++ trunk/cgi-bin/cleanhtml.pl	2012-04-17 13:35:04 UTC (rev 21734)
@@ -444,11 +444,17 @@
                 next TOKEN;
             }
 
-            if ( $tag eq 'lj-music' ) {
+            # LJSUP-11810: Change the widget trava.ru
+            # bypass S2 "print safe" function.
+            # <lj-music> must be expanded at last order
+            if ( $tag eq 'lj-music' && ! $opts->{'ignore_lj_music'} ) {
                 $newdata .= LJ::Setting::Music::format_ljmusic( $attr->{'provider'}, $attr->{'id'} );
 
                 next TOKEN;
             }
+            else {
+                $newdata .= $token->[4];
+            }
 
             ## lj-userpic:
             ##      <lj-userpic> - current journal's default userpic

Tags: amyshkin, livejournal, pl, pm, zilogic
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