Fix HTML escapes for custom log files

This commit is contained in:
iliajie
2023-05-15 20:22:57 +03:00
parent 07f8f1df4e
commit d34994b5c0
2 changed files with 4 additions and 4 deletions

View File

@@ -102,7 +102,7 @@ if ($config{'others'} && $access{'others'}) {
# Display extra log files
foreach $e (&extra_log_files()) {
local @cols;
push(@cols, &text('index_file', $e->{'file'}));
push(@cols, &text('index_file', &html_escape($e->{'file'})));
push(@cols, $e->{'desc'});
push(@cols, &ui_link("view_log.cgi?extra=$e->{'file'}&view=1", $text{'index_view'}) );
push(@col3, \@cols);

View File

@@ -115,10 +115,10 @@ if (@others) {
next if (!&can_edit_log($o));
local @cols;
if ($o->{'file'}) {
push(@cols, &text('index_file',$o->{'file'}));
push(@cols, &text('index_file', "<tt>".&html_escape($o->{'file'})."</tt>"));
}
else {
push(@cols, &text('index_cmd', "<tt>".$o->{'cmd'}."</tt>"));
push(@cols, &text('index_cmd', "<tt>".&html_escape($o->{'cmd'})."</tt>"));
}
if ($config{'tags'}) {
push(@cols, "");
@@ -136,7 +136,7 @@ if (@others) {
foreach $e (&extra_log_files()) {
next if (!&can_edit_log($e));
local @cols;
push(@cols, &text('index_file', $e->{'file'}));
push(@cols, &text('index_file', "<tt>".&html_escape($e->{'file'})."</tt>"));
if ($config{'tags'}) {
push(@cols, "");
}