mirror of
https://github.com/MailScanner/v5.git
synced 2024-11-10 17:35:06 +08:00
This commit is contained in:
parent
8ad3b65283
commit
40ac7a20e6
1 changed files with 5 additions and 1 deletions
|
@ -4597,7 +4597,11 @@ sub SignWarningMessage {
|
|||
$warning = $this->ReadVirusWarning('inlinehtmlwarning');
|
||||
#$warning = quotemeta $warning; # Must leave HTML tags alone!
|
||||
foreach $line (@body) {
|
||||
$line =~ s/\<html\>/$&$warning/i;
|
||||
# html tags can have extra attributes. In a case where the <html> tag
|
||||
# has attributes and is closed on a subsequent line, the warning will
|
||||
# actually be in the tag, but it's malformed in any case because it
|
||||
# precedes any <head> and <body> tags and clients seem to render it OK.
|
||||
$line =~ s/\<html( [^>]*)?(\>|$)/$&$warning/i;
|
||||
$io->print($line);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue