[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 08 Nov 2004 23:08:46 -0000


albertel		Mon Nov  8 18:08:46 2004 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - ssi_body works with html comments script blocks  (and non)
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.564 loncom/lonnet/perl/lonnet.pm:1.565
--- loncom/lonnet/perl/lonnet.pm:1.564	Mon Nov  8 14:19:12 2004
+++ loncom/lonnet/perl/lonnet.pm	Mon Nov  8 18:08:46 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.564 2004/11/08 19:19:12 albertel Exp $
+# $Id: lonnet.pm,v 1.565 2004/11/08 23:08:46 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1188,8 +1188,7 @@
     my ($filelink,%form)=@_;
     my $output=($filelink=~/^http\:/?&externalssi($filelink):
                                      &ssi($filelink,%form));
-    $output=~
-            s/\/\/ BEGIN LON\-CAPA Internal.+\/\/ END LON\-CAPA Internal\s//gs;
+    $output=~s|//(\s*<!--)? BEGIN LON-CAPA Internal.+// END LON-CAPA Internal\s*(-->)?\s||gs;
     $output=~s/^.*?\<body[^\>]*\>//si;
     $output=~s/(.*)\<\/body\s*\>.*?$/$1/si;
     return $output;