mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-07-27 06:03 am

[dw-free] Allow <user name > linking to OpenID accounts with username.domain.tld in addition t

[commit: http://hg.dwscoalition.org/dw-free/rev/9a7eb01a1705]

http://bugs.dwscoalition.org/show_bug.cgi?id=1355

Fix linking of invalid usernames so it tries to render.

Patch by [personal profile] foxfirefey.

Files modified:
  • cgi-bin/cleanhtml.pl
--------------------------------------------------------------------------------
diff -r 847b1db4f477 -r 9a7eb01a1705 cgi-bin/cleanhtml.pl
--- a/cgi-bin/cleanhtml.pl	Mon Jul 27 04:47:34 2009 +0000
+++ b/cgi-bin/cleanhtml.pl	Mon Jul 27 06:03:40 2009 +0000
@@ -521,6 +521,8 @@ sub clean
                         } else {
                             $newdata .= $u->ljuser_display( { no_ljuser_class => $to_external_site } );
                         }
+                    } elsif ( my $username = LJ::canonical_username( $user ) ) {
+                        $newdata .= LJ::ljuser( $user, { no_ljuser_class => $to_external_site } );
                     } else {
                         $user = LJ::no_utf8_flag( $user );
                         $newdata .= "<b>[Bad username or unknown identity: " . LJ::ehtml( $user ) . "]</b>";
--------------------------------------------------------------------------------