журнал журнал (shhh) wrote in changelog,
журнал журнал
shhh
changelog

[livejournal] r22348: LJSUP-11578: XML RPC, ?\209?\132?\209?\1...

Committer: nnikulochkina
LJSUP-11578: XML RPC, ?\209?\132?\209?\131?\208?\189?\208?\186?\209?\134?\208?\184?\209?\143 getevents: parseljtags ?\208?\189?\208?\181 ?\208?\186?\208?\190?\209?\128?\209?\128?\208?\181?\208?\186?\209?\130?\208?\189?\208?\190 ?\209?\128?\208?\176?\208?\177?\208?\190?\209?\130?\208?\176?\208?\181?\209?\130 ?\209?\129 lj user
U   trunk/cgi-bin/ljtextutil.pl
Modified: trunk/cgi-bin/ljtextutil.pl
===================================================================
--- trunk/cgi-bin/ljtextutil.pl	2012-06-28 18:58:46 UTC (rev 22347)
+++ trunk/cgi-bin/ljtextutil.pl	2012-06-29 07:01:56 UTC (rev 22348)
@@ -855,12 +855,14 @@
     $args{event} =~ s#<lj\-embed[^>]+/>#<a href="$args{embed_url}">View movie.</a>#g;
     while ( $args{event} =~ /<lj\s+user="([^>"]+)"\s*\/?>/g ){
         # follow the documentation - no about communites, openid or syndicated, just user
-        my $user = LJ::load_user($1); 
+        my $username = $1;
+        my $user = LJ::load_user($username); 
+        # $username may be not equal to $name (if $username is not canonical username)
         my $name = $user->username;
         my $html = '<a href="' . $user->profile_url . '" target="_blank"><img src="' 
         . $LJ::IMGPREFIX . '/userinfo.gif?v=17080" alt=""></a><a href="'
         . $user->journal_base . '" target="_blank">' . $name . '</a>';
-        $args{event} =~ s#<lj\s+user="$name"\s*\/?>#$html#g;
+        $args{event} =~ s#<lj\s+user="$username"\s*\/?>#$html#g;
     }
     $args{event} =~ s#</?lj-cut[^>]*>##g;
     

Tags: livejournal, nikulochkina, nnikulochkina, 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