slartyblartfast (slartyblartfast) wrote in changelog,
slartyblartfast
slartyblartfast
changelog

[livejournal] r16457: LJGI-65: Complex cut off for html

Committer: mchernyshev
LJGI-65: Complex cut off for html
- add tag lj-poll-n processing.
U   trunk/cgi-bin/ljtextutil.pl
Modified: trunk/cgi-bin/ljtextutil.pl
===================================================================
--- trunk/cgi-bin/ljtextutil.pl	2010-03-25 13:40:33 UTC (rev 16456)
+++ trunk/cgi-bin/ljtextutil.pl	2010-03-26 05:32:50 UTC (rev 16457)
@@ -686,6 +686,19 @@
             $text_out .= $reconstruct{$tag}->($type, $tag, $attr);
         }
 
+        # <lj-poll-n>
+        if ($tag =~ m/^lj-poll-(\d+)$/g && 'S' eq $type) {
+           my $pollid = $1;
+           my $name = LJ::Poll->new($pollid)->name;
+           if ($name) {
+               LJ::Poll->clean_poll(\$name);
+           } else {
+               $name = "#$pollid";
+           }
+
+           $text_out .= "<a href=\"$LJ::SITEROOT/poll/?id=$pollid\" target=\"_blank\" >View Poll: $name.</a>";
+        }
+
         last if $finish;
     }
 

Tags: livejournal, pl, slartyblartfast
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