afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-07-05 10:48 am

[dw-free] Unescape %xx sequences in OpenID URLs for human display

[commit: http://hg.dwscoalition.org/dw-free/rev/17691223abbd]

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

Codemerge.

Patch from LiveJournal, prepared for Dreamwidth by [staff profile] denise.

Files modified:
  • cgi-bin/LJ/User.pm
--------------------------------------------------------------------------------
diff -r c96b2f3cf427 -r 17691223abbd cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Sun Jul 05 10:43:27 2009 +0000
+++ b/cgi-bin/LJ/User.pm	Sun Jul 05 10:47:29 2009 +0000
@@ -2281,6 +2281,9 @@ sub display_name {
         $url = $id->value;
         $name = Net::OpenID::VerifiedIdentity::DisplayOfURL($url, $LJ::IS_DEV_SERVER);
         $name = LJ::run_hook("identity_display_name", $name) || $name;
+
+        ## Unescape %xx sequences
+        $name =~ s/%([\dA-Fa-f]{2})/chr(hex($1))/ge;
     }
     return $name;
 }
--------------------------------------------------------------------------------