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

[livejournal] r21069: LJSUP-11036 (Paid and permanent users sh...

Committer: ailyin
LJSUP-11036 (Paid and permanent users should be able to use classes in the posts)
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2012-02-01 14:03:14 UTC (rev 21068)
+++ trunk/cgi-bin/cleanhtml.pl	2012-02-01 14:20:58 UTC (rev 21069)
@@ -1837,6 +1837,19 @@
     my $cleancss = $opts->{'journalid'} ?
         ! $LJ::STYLE_TRUSTED{ $opts->{'journalid'} } : 0;
 
+    my $strongcleancss = $cleancss;
+
+    my $poster         = LJ::load_userid( $opts->{'posterid'} );
+    my $journal        = LJ::load_userid( $opts->{'journalid'} );
+    my $active_journal = LJ::get_active_journal();
+    if ( $poster &&
+        $poster->get_cap('no_strong_clean_css') &&
+        $poster->equals($journal) &&
+        $poster->equals($active_journal) )
+    {
+        $strongcleancss = 0;
+    }
+
     # slow path: need to be run it through the cleaner
     clean($ref, {
         'linkify'          => 1,
@@ -1849,7 +1862,7 @@
         'remove'           => $event_remove,
         'autoclose'        => \@comment_close,
         'cleancss'         => $cleancss,
-        'strongcleancss'   => $cleancss,
+        'strongcleancss'   => $strongcleancss,
         'noearlyclose'     => 1,
         'tablecheck'       => 1,
         'ljrepost_allowed' => 1,

Tags: ailyin, 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