[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 02 Dec 2003 19:35:26 -0000
albertel Tue Dec 2 14:35:26 2003 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- match the outermost <body> </body>
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.450 loncom/lonnet/perl/lonnet.pm:1.451
--- loncom/lonnet/perl/lonnet.pm:1.450 Wed Nov 12 16:37:33 2003
+++ loncom/lonnet/perl/lonnet.pm Tue Dec 2 14:35:26 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.450 2003/11/12 21:37:33 matthew Exp $
+# $Id: lonnet.pm,v 1.451 2003/12/02 19:35:26 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1153,8 +1153,8 @@
my ($filelink,%form)=@_;
my $output=($filelink=~/^http\:/?&externalssi($filelink):
&ssi($filelink,%form));
- $output=~s/^.*\<body[^\>]*\>//si;
- $output=~s/\<\/body\s*\>.*$//si;
+ $output=~s/^.*?\<body[^\>]*\>//si;
+ $output=~s/(.*)\<\/body\s*\>.*?$/$1/si;
$output=~
s/\/\/ BEGIN LON\-CAPA Internal.+\/\/ END LON\-CAPA Internal\s//gs;
return $output;