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

[livejournal] r19219: LJSUP-8964 (Lj like: incorrect working c...

Committer: ailyin
LJSUP-8964 (Lj like: incorrect working crossposting)
U   trunk/cgi-bin/LJ/Text.pm
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/LJ/Text.pm
===================================================================
--- trunk/cgi-bin/LJ/Text.pm	2011-06-03 07:17:54 UTC (rev 19218)
+++ trunk/cgi-bin/LJ/Text.pm	2011-06-03 07:22:49 UTC (rev 19219)
@@ -335,7 +335,7 @@
 sub drop_html {
     my ( $class, $what ) = @_;
 
-    LJ::CleanHTML::clean_comment(\$what);
+    LJ::CleanHTML::clean_comment( \$what, { 'textonly' => 1 });
 
     $what =~ s/<.*?>/ /g;
     $what =~ s/\s+/ /g;

Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2011-06-03 07:17:54 UTC (rev 19218)
+++ trunk/cgi-bin/cleanhtml.pl	2011-06-03 07:22:49 UTC (rev 19219)
@@ -715,6 +715,8 @@
             }
 
             elsif ( $tag eq 'lj-like' ) {
+                next TOKEN if $opts->{'textonly'};
+
                 unless ( exists $opts->{'entry_url'} && $opts->{'entry_url'} )
                 {
                     $newdata .= '<b>[lj-like in invalid context]</b>';

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