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

www lon-capa-cvs@mail.lon-capa.org
Wed, 13 Jul 2005 21:43:04 -0000


www		Wed Jul 13 17:43:04 2005 EDT

  Modified files:              
    /loncom/publisher	loncleanup.pm 
  Log:
  Was not finding <img> if there was a slash in the URL (argh).
  
  
Index: loncom/publisher/loncleanup.pm
diff -u loncom/publisher/loncleanup.pm:1.5 loncom/publisher/loncleanup.pm:1.6
--- loncom/publisher/loncleanup.pm:1.5	Tue May 31 13:41:38 2005
+++ loncom/publisher/loncleanup.pm	Wed Jul 13 17:43:02 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to cleanup XML files
 #
-# $Id: loncleanup.pm,v 1.5 2005/05/31 17:41:38 albertel Exp $
+# $Id: loncleanup.pm,v 1.6 2005/07/13 21:43:02 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -218,8 +218,9 @@
     }
 # Generate empty tags, remove wrong end tags
     unless ($blockemptytags) {
-	$raw=~s/\<(br|hr|img|meta|allow|basefont)([^\>\/]*?)\>/\<$1$2 \/\>/gis;
-	$raw=~s/\<\/(br|hr|img|meta|allow|basefont)\>//gis;
+	$raw=~s/\<(br|hr|img|meta|embed|allow|basefont)([^\>]*?)\>/\<$1$2 \/\>/gis;
+	$raw=~s/\<\/(br|hr|img|meta|embed|allow|basefont)\>//gis;
+	$raw=~s/\/ \/\>/\/\>/gs;
 	unless ($full) {
 	    $raw=~s/\<[\/]*(body|head|html)\>//gis;
 	}