diff --git a/mysql/index.cgi b/mysql/index.cgi
index b5a4fa79a..e3fb5a72e 100755
--- a/mysql/index.cgi
+++ b/mysql/index.cgi
@@ -85,7 +85,8 @@ if ($r == 0) {
print &ui_details({
'title' => $text{'syslog_desc2'},
'content' => &text('index_emsg',"$rout"),
- 'class' =>'error'});
+ 'class' =>'error',
+ 'html' => 1}, 1);
}
if ($access{'stop'} && &is_mysql_local()) {
@@ -109,7 +110,7 @@ elsif ($r == -1) {
'title' => $text{'syslog_desc2'},
'content' => &text('index_emsg',"$rout"),
'class' => 'error',
- 'open' => 'open'}) . "
";
+ 'html' => 1}, 1) . "
";
}
print &ui_form_start("login.cgi", "post");
diff --git a/ui-lib.pl b/ui-lib.pl
index 3bf83525a..68d90dcaa 100755
--- a/ui-lib.pl
+++ b/ui-lib.pl
@@ -2723,7 +2723,7 @@ if (defined(&theme_ui_line_break_double)) {
return "
\n";
}
-=head2 ui_details(title, content, class)
+=head2 ui_details(Config, Opened)
Creates a disclosure widget in which information is visible only when
the widget is toggled into an "open" state.
@@ -2731,16 +2731,21 @@ the widget is toggled into an "open" state.
=cut
sub ui_details
{
-my ($c) = @_;
+my ($c, $o) = @_;
if (defined(&theme_ui_details)) {
return &theme_ui_details(@_);
}
my $rv;
-$c->{'class'} = "class=\"$c->{'class'}\"" if($c->{'class'});
-$rv = "{'class'} $c->{'open'}>";
+if (!$c->{'html'}) {
+ $c->{'title'} = &html_escape($c->{'title'});
+ $c->{'content'} = &html_escape($c->{'content'});
+ }
+$c->{'class'} = " class=\"@{["e_escape($c->{'class'})]}\"" if($c->{'class'});
+$o = ' open' if ($o);
+$rv = "{'class'}$o>";
$rv .= "$c->{'title'}
";
-$rv .= "$c->{'content'}";
+$rv .= "$c->{'content'}";
$rv .= " ";
return $rv;
}