[LON-CAPA-cvs] cvs: loncom /xml scripttag.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 23 Jan 2007 21:28:41 -0000
albertel Tue Jan 23 16:28:41 2007 EDT
Modified files:
/loncom/xml scripttag.pm
Log:
- js doesn't like - or . in function names
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.139 loncom/xml/scripttag.pm:1.140
--- loncom/xml/scripttag.pm:1.139 Wed Dec 20 17:41:59 2006
+++ loncom/xml/scripttag.pm Tue Jan 23 16:28:41 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# <script> definiton
#
-# $Id: scripttag.pm,v 1.139 2006/12/20 22:41:59 albertel Exp $
+# $Id: scripttag.pm,v 1.140 2007/01/23 21:28:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -126,6 +126,8 @@
my $end_page =
&Apache::loncommon::end_page({'js_ready' => 1,});
+ $uname =~s/\W//g;
+ $udom =~s/\W//g;
$result.="<script type=\"text/javascript\">
// <![CDATA[
function LONCAPA_scriptvars_".$uname."_".$udom."_"."$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=500,height=500,scrollbars=1,resizable=yes');newWindow.$windowopen;newWindow.document.writeln('$start_page<pre>";