fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-12-23 01:30 pm

[dw-free] Some spam report views display header line as HTML <title> instead of body <h1>

[commit: http://hg.dwscoalition.org/dw-free/rev/6d9638926000]

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

Strip HTML in window title.

Patch by [personal profile] fu.

Files modified:
  • htdocs/admin/spamreports.bml
--------------------------------------------------------------------------------
diff -r c555b372b3dd -r 6d9638926000 htdocs/admin/spamreports.bml
--- a/htdocs/admin/spamreports.bml	Fri Dec 23 19:41:25 2011 +0800
+++ b/htdocs/admin/spamreports.bml	Fri Dec 23 21:29:51 2011 +0800
@@ -178,7 +178,7 @@
             $what += 0;
             my $u = LJ::load_userid($what);
             return $error->('No such posterid.') unless $u;
-            $title = "Spam Reports - By" . $u->ljuser_display . "($state)";
+            $title = "Spam Reports - By " . $u->ljuser_display . "($state)";
         } elsif ($by eq 'poster') {
             my $u = LJ::load_user($what);
             return $error->('No such user.') unless $u;
@@ -306,5 +306,6 @@
 }
 _code?><?page
 title=><?_code return $title; _code?>
+windowtitle=><?_code return LJ::strip_html( $title ); _code?>
 body=><?_code return $body; _code?>
 page?>
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org