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-06-28 01:29 am

[dw-free] Apostrophes breaking the alt text in moodlist

[commit: http://hg.dwscoalition.org/dw-free/rev/25508e22121e]

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

Escape the alt text; include the mood.

Patch by [personal profile] foxfirefey.

Files modified:
  • htdocs/moodlist.bml
--------------------------------------------------------------------------------
diff -r 02b969f3044b -r 25508e22121e htdocs/moodlist.bml
--- a/htdocs/moodlist.bml	Sat Jun 27 16:49:09 2009 +0000
+++ b/htdocs/moodlist.bml	Sun Jun 28 01:28:39 2009 +0000
@@ -101,7 +101,9 @@ body<=
             # Output each of the displayed moods
             foreach my $mood (@show_moods) {
                 if (LJ::get_mood_picture($theme->{'moodthemeid'}, LJ::mood_id($mood), \ my %pic)) {
-                    $ret .= "<td align='center'><img align='absmiddle' alt='$theme->{name}' src=\"$pic{'pic'}\" width='$pic{'w'}' height='$pic{'h'}' hspace='2' vspace='2' />" .
+                    $ret .= "<td align='center'><img align='absmiddle' alt='" .
+                        LJ::ehtml( $theme->{name} . ": " . $mood ) .
+                        "' src=\"$pic{'pic'}\" width='$pic{'w'}' height='$pic{'h'}' hspace='2' vspace='2' />" .
                         "</td>\n";
                 } else {
                     $ret .= "<td></td>\n";
--------------------------------------------------------------------------------