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

[livejournal] r19385: LJSUP-9149 (Error when preview post)

Committer: ailyin
LJSUP-9149 (Error when preview post)
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2011-06-28 07:40:23 UTC (rev 19384)
+++ trunk/cgi-bin/cleanhtml.pl	2011-06-28 07:43:45 UTC (rev 19385)
@@ -725,11 +725,10 @@
 
                 my $entry_url = $opts->{'entry_url'};
                 my $entry = LJ::Entry->new_from_url($entry_url);
-                my $meta = $entry->extract_metadata;
 
-                unless ($entry) {
-                    $newdata .= '<b>[lj-like in invalid context]</b>';
-                    next TOKEN;
+                my $meta = { map { $_ => '' } qw( title description image ) };
+                if ($entry) {
+                    $meta = $entry->extract_metadata;
                 }
 
                 my @buttons = qw(

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

  • 1 comment