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

[livejournal] r21323: LJSUP-11379: lj-spoiler: need change tit...

Committer: anazarov
LJSUP-11379: lj-spoiler: need change title when spoler added in the beginning of the post
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2012-03-07 13:08:18 UTC (rev 21322)
+++ trunk/cgi-bin/cleanhtml.pl	2012-03-07 13:14:38 UTC (rev 21323)
@@ -156,6 +156,7 @@
     my $remove_positioning = $opts->{'remove_positioning'} || 0;
     my $target = $opts->{'target'} || '';
     my $ljrepost_allowed = ($opts->{ljrepost_allowed} && ! $opts->{'textonly'}) || 0;
+    my $ljspoiler_allowed = $opts->{'textonly'}? 0 : 1;
 
     my $poster = LJ::load_userid($opts->{posterid});
     my $put_nofollow = not ($poster and $poster->get_cap('paid') and not $poster->get_cap('trynbuy'));
@@ -466,7 +467,7 @@
                 $newdata .= Encode::decode_utf8(LJ::WishElement->check_and_expand_entry($userid, $wishid));
             }
 
-            if ( $tag eq 'lj-spoiler' ) {
+            if ( $tag eq 'lj-spoiler' and $ljspoiler_allowed ) {
                 my $title = $attr->{'title'} ||
                     $attr->{'text'} ||
                     Encode::decode_utf8(
@@ -1887,7 +1888,7 @@
 }
 
 ## returns a pure text subject (needed in links, email headers, etc...)
-my $subjectall_eat = [qw[head title style layer iframe applet object]];
+my $subjectall_eat = [qw[head title style layer iframe applet object lj-spoiler ]];
 sub clean_subject_all
 {
     my $ref = shift;

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