Skip to content

Commit

Permalink
Fix to stop HTML escaping our own API
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Feb 16, 2025
1 parent 03a40d5 commit 4513247
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mailbox/index.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ for(my $i=$start; $i<=$end; $i++) {
}

# Date and size columns
push(@cols, $bs.&eucconv_and_escape(&simplify_date($m->{'header'}->{'date'})).$be);
push(@cols, $bs.&eucconv(&simplify_date(&html_escape($m->{'header'}->{'date'}))).$be);
push(@cols, $bs.&nice_size($m->{'size'}, 1024).$be);
$rowtds[$#cols] .= " data-sort=".$m->{'size'};

Expand Down
4 changes: 2 additions & 2 deletions mailbox/view_mail.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ else {
$in{'id'}, $subs));
}
print &ui_table_row($text{'mail_date'},
&eucconv_and_escape(
&simplify_date($mail->{'header'}->{'date'})));
&eucconv(
&simplify_date(&html_escape($mail->{'header'}->{'date'}))));

my $subj = $mail->{'header'}->{'subject'};
$subj =~ s/^((Re:|Fwd:|\[\S+\])\s*)+//ig;
Expand Down

0 comments on commit 4513247

Please sign in to comment.