[LON-CAPA-cvs] cvs: loncom /imspackages imsimport.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 27 Mar 2006 18:39:55 -0000


raeburn		Mon Mar 27 13:39:55 2006 EDT

  Modified files:              
    /loncom/imspackages	imsimport.pm 
  Log:
  Escape line feeds in $start_page and $end_page when included in javascript.
  
  
Index: loncom/imspackages/imsimport.pm
diff -u loncom/imspackages/imsimport.pm:1.16 loncom/imspackages/imsimport.pm:1.17
--- loncom/imspackages/imsimport.pm:1.16	Fri Mar 24 12:36:27 2006
+++ loncom/imspackages/imsimport.pm	Mon Mar 27 13:39:55 2006
@@ -46,6 +46,8 @@
 					'js_ready'    => 1,});
     my $end_page = 
 	&Apache::loncommon::end_page({'js_ready' => 1,});
+    $start_page =~ s/\n/\\n/g;
+    $end_page =~ s/\n/\\n/g;
 
     $$jsref = <<"END_OF_ONE";
 function verify() {