Remove HTML from updates email

This commit is contained in:
Jamie Cameron
2008-06-18 14:12:53 +00:00
parent 0e15104383
commit f467d6b00d
3 changed files with 5 additions and 1 deletions

View File

@@ -93,6 +93,7 @@ foreach $u (@updates) {
else {
$irv = &install_usermin_module($mtemp, 1, 0);
if (!ref($irv)) {
$irv =~ s/<[^>]*>//g;
$irv .= &text('update_failed', $irv)."\n\n";
}
else {

View File

@@ -2932,6 +2932,8 @@ else {
}
# text(message, [substitute]+)
# Returns a translated message from %text, but with $1, $2, etc.. replaced with the
# substitute parameters.
sub text
{
local $rv = $text{$_[0]};

View File

@@ -55,7 +55,7 @@ foreach $url (@urls) {
$u->[4]."\n\n";
}
else {
# Actually do the update .. XXX remove html from comments
# Actually do the update ..
local (@mdescs, @mdirs, @msizes);
$rv .= &text('update_mok', $u->[0], $u->[1])."\n".
($info{'longdesc'} ? "$text{'update_fixes'} : " : "").
@@ -75,6 +75,7 @@ foreach $url (@urls) {
$irv = &install_webmin_module($mtemp, 1, 0,
[ "admin", "root" ]);
if (!ref($irv)) {
$irv =~ s/<[^>]*>//g;
$rv .= &text('update_failed', $irv)."\n\n";
}
else {