On Fri, 16 Apr 2004, Kevin A. McGrail wrote:
> if ($io = $entity->open("r")) {
> while (defined($currentline = $io->getline)) {
> if ($currentline =~ s/<(iframe|script|object)\b/<no-$1 /ig) {
> $badtag++;
> }
> $output .= $currentline;
> }
> $io->close;
>
> if ($badtag) {
> if ($io = $entity->open("w")) {
> $io->print($output);
> $io->close;
> }
I wonder:
a) You read in all the entity into memory, without size check?
b) As you already have all the lines in memory, why don't you apply the
s// operation on $output once?
Bye,
--
Steffen Kaiser
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang