smeserver-hosts/root/etc/e-smith/db/hosts/migrate/30sanitise_host_comment

11 lines
308 B
Plaintext

{
# Purge quoting chars in comments to fix bug 8723 & bug 8806
foreach my $host ($DB->get_all)
{
my $comment = $host->prop('Comment');
next unless $comment;
$comment =~ s/[^a-zA-Z0-9\ \_\-\,\.]+//g;
$host->merge_props(Comment => $comment);
}
}