Let you create tags using openid user URLs, so you can do <user 
name="afuna.livejournal.com"> instead of having to hunt down the information 
and do <user name="ext_300">

        Patch by foxfirefey. 

diffs (29 lines):

diff -r a01cea3b2b64 -r fc00b08746ce cgi-bin/cleanhtml.pl
--- a/cgi-bin/cleanhtml.pl      Sun Jul 26 00:42:30 2009 +0000
+++ b/cgi-bin/cleanhtml.pl      Sun Jul 26 03:19:41 2009 +0000
@@ -514,18 +514,16 @@ sub clean
                     }
 
                 # failing that, no site or local site, use the local behavior
-                } elsif (length $user) {
-                    my $orig_user = $user; # save for later, in case
-                    $user = LJ::canonical_username($user);
-                    if (length $user) {
-                        if ($opts->{'textonly'}) {
-                            $newdata .= $user;
+                } elsif ( length $user ) {
+                    if ( my $u = LJ::load_user_or_identity( $user ) ) {
+                        if ( $opts->{textonly} ) {
+                            $newdata .= $u->display_name;
                         } else {
-                            $newdata .= LJ::ljuser( $user, { no_ljuser_class 
=> $to_external_site } );
+                            $newdata .= $u->ljuser_display( { no_ljuser_class 
=> $to_external_site } );
                         }
                     } else {
-                        $orig_user = LJ::no_utf8_flag($orig_user);
-                        $newdata .= "<b>[Bad username: " . 
LJ::ehtml($orig_user) . "]</b>";
+                        $user = LJ::no_utf8_flag( $user );
+                        $newdata .= "<b>[Bad username or unknown identity: " . 
LJ::ehtml( $user ) . "]</b>";
                     }
                 } else {
                     $newdata .= "<b>[Unknown site tag]</b>";
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to