;
close FH;
$content =~ m{]*>(.*)}si or return; # don't bother with non-html stuff
$content = $1;
$content = $1 if $content =~ m{(.*)}si;
$content = $1 if $content =~ m{(.*)
}si;
$content =~ s{
]+src="([^"]+)"[^>]*>}{$1}gi;
$content =~ s{}{}gi;
$content =~ s{]*>(.*?)
}
{join("", map " $_\n", split(/\n/, $1))}egi;
$content =~ s{]*>}{\n\n}gi;
$content =~ s{<[^>]+>}{}g;
open FH, "> $file" or return;
print FH CGI::unescapeHTML($content);
close FH;
return 1;
}
1;
=head1 NAME
CGI::Kwiki::Import - Import the external Kwiki page
=head1 DESCRIPTION
See installed kwiki pages for more information.
=head1 AUTHOR
Autrijus Tang
Hsin-Chan Chien
=head1 COPYRIGHT
Copyright 2002, 2003 by Autrijus Tang, Hsin-Chan Chien.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See L
=cut