[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm

www lon-capa-cvs@mail.lon-capa.org
Mon, 24 Jun 2002 14:25:38 -0000


www		Mon Jun 24 10:25:38 2002 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  Bug 517 - puts the <allow> statements in front of the last closing tag and
  hopefully does not add any more spurious \n's. Should in fact clean up
  those blank line on re-publish.
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.82 loncom/publisher/lonpublisher.pm:1.83
--- loncom/publisher/lonpublisher.pm:1.82	Thu May 23 17:12:44 2002
+++ loncom/publisher/lonpublisher.pm	Mon Jun 24 10:25:38 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.82 2002/05/23 21:12:44 albertel Exp $
+# $Id: lonpublisher.pm,v 1.83 2002/06/24 14:25:38 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -444,8 +444,7 @@
 	       }
            }
         }
-        $allowstr=~s/\n+/\n/g;
-        $outstring=~s/(\<\/[^\>]+\>\s*)$/$allowstr$1/s;
+        $outstring=~s/\n*(\<\/[^\>]+\>)\s*$/$allowstr\n$1\n/s;
 
 	#Encode any High ASCII characters
 	$outstring=&HTML::Entities::encode($outstring,"\200-\377");