Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r18786: LJSUP-8482: Removing "style" attribute f...

Committer: gariev
LJSUP-8482: Removing "style" attribute from posts
U   trunk/cgi-bin/LJ/Entry.pm
U   trunk/cgi-bin/LJ/S2/DayPage.pm
U   trunk/cgi-bin/LJ/S2/FriendsPage.pm
U   trunk/cgi-bin/LJ/S2/RecentPage.pm
U   trunk/cgi-bin/cleanhtml.pl
U   trunk/cgi-bin/ljfeed.pl
U   trunk/cgi-bin/ljviews.pl
U   trunk/htdocs/preview/entry.bml
U   trunk/htdocs/talkpost.bml
U   trunk/htdocs/talkread.bml
U   trunk/htdocs/update.bml
Modified: trunk/cgi-bin/LJ/Entry.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry.pm	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/cgi-bin/LJ/Entry.pm	2011-04-04 10:53:13 UTC (rev 18786)
@@ -821,7 +821,8 @@
         $opts->{expand_cut} = 1;
         $opts->{cuturl}     = $self->url;
     }
-
+    $opts->{journalid} = $self->journalid;
+    
     $self->_load_text unless $self->{_loaded_text};
     my $event = $self->{event};
     LJ::CleanHTML::clean_event(\$event, $opts);
@@ -840,7 +841,7 @@
 {
     my $self = shift;
     my $event = $self->event_raw;
-    LJ::CleanHTML::clean_event( \$event, { textonly => 1} ) if $event;
+    LJ::CleanHTML::clean_event( \$event, { textonly => 1, journalid => $self->journalid, } ) if $event;
     return $event;
 }
 

Modified: trunk/cgi-bin/LJ/S2/DayPage.pm
===================================================================
--- trunk/cgi-bin/LJ/S2/DayPage.pm	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/cgi-bin/LJ/S2/DayPage.pm	2011-04-04 10:53:13 UTC (rev 18786)
@@ -158,7 +158,8 @@
                                              'cuturl' => LJ::item_link($u, $itemid, $anum),
                                              'ljcut_disable' => $remote ? $remote->{'opt_ljcut_disable_lastn'} : undef,
                                              'suspend_msg' => $suspend_msg,
-                                             'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0, });
+                                             'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0, 
+                                             'journalid' =>  $entry_obj->journalid, });
         LJ::expand_embedded($u, $ditemid, $remote, \$text);
 
         $text = LJ::ContentFlag->transform_post(post => $text, journal => $u,

Modified: trunk/cgi-bin/LJ/S2/FriendsPage.pm
===================================================================
--- trunk/cgi-bin/LJ/S2/FriendsPage.pm	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/cgi-bin/LJ/S2/FriendsPage.pm	2011-04-04 10:53:13 UTC (rev 18786)
@@ -248,7 +248,8 @@
                                              'maximgheight' => $maximgheight,
                                              'ljcut_disable' => $remote ? $remote->{'opt_ljcut_disable_friends'} : undef,
                                              'suspend_msg' => $suspend_msg,
-                                             'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0, });
+                                             'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0,
+                                             'journalid' =>  $entry_obj->journalid, });
         LJ::expand_embedded($friends{$friendid}, $ditemid, $remote, \$text);
 
         $text = LJ::ContentFlag->transform_post(post => $text, journal => $friends{$friendid},

Modified: trunk/cgi-bin/LJ/S2/RecentPage.pm
===================================================================
--- trunk/cgi-bin/LJ/S2/RecentPage.pm	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/cgi-bin/LJ/S2/RecentPage.pm	2011-04-04 10:53:13 UTC (rev 18786)
@@ -187,7 +187,8 @@
                                               'cuturl' => LJ::item_link($u, $itemid, $item->{'anum'}),
                                               'ljcut_disable' => ($remote) ? $remote->prop("opt_ljcut_disable_lastn") : undef,
                                               'suspend_msg' => $suspend_msg,
-                                              'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0, });
+                                              'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0,
+                                              'journalid' =>  $entry_obj->journalid, });
         LJ::expand_embedded($u, $ditemid, $remote, \$text);
 
         $text = LJ::ContentFlag->transform_post(post => $text, journal => $u,

Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/cgi-bin/cleanhtml.pl	2011-04-04 10:53:13 UTC (rev 18786)
@@ -1631,7 +1631,7 @@
         'mode'          => 'allow',
         'remove'        => $event_remove,
         'autoclose'     => \@comment_close,
-        'cleancss'      => 1,
+        'cleancss'      => !$LJ::S2_TRUSTED{ $opts->{journalid} },
         'noearlyclose'  => 1,
         'tablecheck'    => 1,
         'ljrepost_allowed' => 1,

Modified: trunk/cgi-bin/ljfeed.pl
===================================================================
--- trunk/cgi-bin/ljfeed.pl	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/cgi-bin/ljfeed.pl	2011-04-04 10:53:13 UTC (rev 18786)
@@ -232,7 +232,11 @@
             }
 
             LJ::CleanHTML::clean_event(\$event,
-                                       { 'wordlength' => 0, 'preformatted' => $logprops{$itemid}->{'opt_preformatted'} });
+                {   'wordlength'    => 0, 
+                    'preformatted'  => $logprops{$itemid}->{'opt_preformatted'},
+                    'journalid'     => $u->userid,
+                }
+            );
 
             # do this after clean so we don't have to about know whether or not
             # the event is preformatted

Modified: trunk/cgi-bin/ljviews.pl
===================================================================
--- trunk/cgi-bin/ljviews.pl	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/cgi-bin/ljviews.pl	2011-04-04 10:53:13 UTC (rev 18786)
@@ -1336,7 +1336,8 @@
                                                'cuturl' => LJ::item_link($u, $itemid, $item->{'anum'}),
                                                'ljcut_disable' => ($remote) ? $remote->{'opt_ljcut_disable_lastn'} : undef,
                                                'suspend_msg' => $suspend_msg,
-                                               'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0, });
+                                               'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0,
+                                               'journalid' =>  $entry_obj->journalid, });
         LJ::expand_embedded($u, $ditemid, $remote, \$event);
 
         $event = LJ::ContentFlag->transform_post(post => $event, journal => $u,
@@ -1858,7 +1859,8 @@
                                               'maximgheight' => $maximgheight,
                                               'ljcut_disable' => ($remote) ? $remote->{'opt_ljcut_disable_friends'} : undef,
                                               'suspend_msg' => $suspend_msg,
-                                              'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0, });
+                                              'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0,
+                                              'journalid' =>  $entry_obj->journalid, });
         LJ::expand_embedded($friends{$friendid}, $ditemid, $remote, \$event);
 
         $event = LJ::ContentFlag->transform_post(post => $event, journal => $friends{$friendid},
@@ -2582,7 +2584,8 @@
                                               'cuturl' => LJ::item_link($u, $itemid, $anum),
                                               'ljcut_disable' => ($remote) ? $remote->{'opt_ljcut_disable_lastn'} : undef,
                                               'suspend_msg' => $suspend_msg,
-                                              'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0, });
+                                              'unsuspend_supportid' => $suspend_msg ? $entry_obj->prop("unsuspend_supportid") : 0,
+                                              'journalid' =>  $entry_obj->journalid, });
         LJ::expand_embedded($u, $ditemid, $remote, \$event);
 
         $event = LJ::ContentFlag->transform_post(post => $event, journal => $u,

Modified: trunk/htdocs/preview/entry.bml
===================================================================
--- trunk/htdocs/preview/entry.bml	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/htdocs/preview/entry.bml	2011-04-04 10:53:13 UTC (rev 18786)
@@ -45,6 +45,7 @@
     # clean content normally
     LJ::CleanHTML::clean_event(\$event, {
         preformatted => $req{'prop_opt_preformatted'},
+        journalid    => $u->userid,
     });
     # expand the embedded content for reals
     LJ::EmbedModule->expand_entry($u, \$event, preview => 1,);

Modified: trunk/htdocs/talkpost.bml
===================================================================
--- trunk/htdocs/talkpost.bml	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/htdocs/talkpost.bml	2011-04-04 10:53:13 UTC (rev 18786)
@@ -208,6 +208,7 @@
                                           'unsuspend_supportid' => $suspend_msg ? $entry->prop("unsuspend_supportid") : 0, 
                                           'cuturl' => $talkurl,
                                           'expand_cut' => 1,
+                                          'journalid' =>  $entry->journalid,
                                           });
     LJ::expand_embedded($u, $ditemid, $remote, \$event);
     BML::ebml(\$event);

Modified: trunk/htdocs/talkread.bml
===================================================================
--- trunk/htdocs/talkread.bml	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/htdocs/talkread.bml	2011-04-04 10:53:13 UTC (rev 18786)
@@ -271,6 +271,7 @@
             unsuspend_supportid => $suspend_msg ? $entry->prop("unsuspend_supportid") : 0, 
             cuturl              => $talkurl, 
             expand_cut          => !$no_cut_expand,
+            journalid           => $entry->journalid,
         }
     );
     LJ::expand_embedded($u, $ditemid, $remote, \$event);

Modified: trunk/htdocs/update.bml
===================================================================
--- trunk/htdocs/update.bml	2011-04-04 09:41:52 UTC (rev 18785)
+++ trunk/htdocs/update.bml	2011-04-04 10:53:13 UTC (rev 18786)
@@ -167,7 +167,7 @@
             $subject ||= (LJ::ehtml($entry->subject_orig) || LJ::Lang::ml("repost.default_subject"));
             unless ($event){
                 $event = $entry->event_raw;
-                LJ::CleanHTML::clean_event(\$event, { cuturl => $entry->url });
+                LJ::CleanHTML::clean_event(\$event, { cuturl => $entry->url, journalid => $entry->journalid });
                 $event = LJ::Lang::ml("repost.wrapper", { 
                                             username => $entry->poster->username,
                                             url      => $entry->url,

Tags: bml, gariev, livejournal, pl, pm
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