vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17222: LJSV-1101: update processing wrong lj-re...

Committer: vsukhanov
LJSV-1101: update processing wrong lj-repost syntax.
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2010-08-30 07:33:57 UTC (rev 17221)
+++ trunk/cgi-bin/cleanhtml.pl	2010-08-30 07:54:51 UTC (rev 17222)
@@ -965,7 +965,10 @@
                     $newdata .= "<a name='cutid$cutcount-end'></a>"
                 }
             }
-            elsif ($tag eq "lj-repost" and $ljrepost_allowed){
+            elsif ($tag eq "lj-repost" and $ljrepost_allowed and exists $opencount{$tag}){
+                ## Add repost button
+                ## If there is opening <lj-repost> tag than $opencount{$tag} exists.
+                ##
                 my $button   = LJ::ehtml($opencount{$tag}->{button}) || LJ::Lang::ml("repost.default_button");
                 my $subject  = LJ::ehtml($opencount{$tag}->{subject});
                 my $captured = substr $newdata => $opencount{$tag}->{offset};

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