[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 15 May 2006 16:23:58 -0000


albertel		Mon May 15 12:23:58 2006 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - $escurl was getting interpolated
  - according to the standard the sequence of characters </  is not allowed in 
    a <script> block so need to make that <\/
  - additonaly url's need to have the & replaced with &amp; if the are going
    to be a attribute argument to href=""
  - and in xhtml it's post not POST
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.180 loncom/interface/lonmenu.pm:1.181
--- loncom/interface/lonmenu.pm:1.180	Mon May  8 18:34:01 2006
+++ loncom/interface/lonmenu.pm	Mon May 15 12:23:58 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.180 2006/05/08 22:34:01 albertel Exp $
+# $Id: lonmenu.pm,v 1.181 2006/05/15 16:23:58 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -109,7 +109,7 @@
 # Textual display only
         if ($env{'request.course.id'}) {
 	    $navmaps=(<<ENDNAV);
-<a href="/adm/navmaps?postdata=$escurl&postsymb=$escsymb" target="_top">$lt{'nav'}</a>
+<a href="/adm/navmaps?postdata=$escurl&amp;postsymb=$escsymb" target="_top">$lt{'nav'}</a>
 ENDNAV
             if (($env{'request.noversionuri'}=~/^\/adm\//) &&
          ($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) &&
@@ -230,7 +230,7 @@
 	my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif");
 	my $remote;
 	if ($env{'user.adv'}) {
-	    $remote = '<td><a href="/adm/remote?action=launch&amp;url=$escurl" target="_top">'.$lt{'launch'}.'</a></td>'
+	    $remote = '<td><a href="/adm/remote?action=launch&amp;url='.$escurl.'" target="_top">'.$lt{'launch'}.'</a></td>'
 	}
 	return (<<ENDINLINEMENU);
 <script type="text/javascript">
@@ -344,7 +344,7 @@
         $newmail = $titletable;
     } else {
 	if ($noremote) {
-	    $newmail.='</td></tr></table>';
+	    $newmail.='</tr></table>';
 	}
     }
     my $timesync=($textual?'':'swmenu.syncclock(1000*'.time.');');
@@ -1183,7 +1183,7 @@
   +"<form name='goannotate' target='Annotator' method='post' "
   +"action='/adm/annotations'>"
   +"<input type='hidden' name='urlnew' value='"+currentURL+"' />"
-  +"</form>"
+  +"<\\/form>"
   +'$end_page');
    annotator.document.close();
 }
@@ -1199,13 +1199,13 @@
    +"<center><form method='post'"
    +" name='newlink' action='/adm/bookmarks' target='bmquery' "
    +">\\n <table width=340 height=150 "
-   +"bgcolor='ffffff' align=center><tr><td>Link Name:<br><input "
-   +"type='text' name='title' size=45 value='"+clienttitle+"'>"
-   +"<br>Address:<br><input type='text' name='address' size='45' "
-   +"value='"+clienthref+"'><br><center><input type='submit' "
-   +"value='Save'> <input type='button' value='Close (no save)' "
-   +"onclick='javascript:window.close();'></center></td>"
-   +"</tr></table></form></center>"
+   +"bgcolor='ffffff' align=center><tr><td>Link Name:<br /><input "
+   +"type='text' name='title' size=45 value='"+clienttitle+"' />"
+   +"<br />Address:<br /><input type='text' name='address' size='45' "
+   +"value='"+clienthref+"' /><br /><center><input type='submit' "
+   +"value='Save' /> <input type='button' value='Close (no save)' "
+   +"onclick='javascript:window.close();' /><\\/center><\\/td>"
+   +"<\\/tr><\\/table><\\/form><\\/center>"
    +'$end_page' );
    bmquery.document.close();
 }
@@ -1215,7 +1215,7 @@
 
 sub serverform {
     return(<<ENDSERVERFORM);
-<form name="server" action="/adm/logout" method="POST" target="_top">
+<form name="server" action="/adm/logout" method="post" target="_top">
 <input type="hidden" name="postdata" value="none" />
 <input type="hidden" name="command" value="none" />
 <input type="hidden" name="url" value="none" />
@@ -1226,14 +1226,14 @@
 
 sub constspaceform {
     return(<<ENDCONSTSPACEFORM);
-<form name="constspace" action="/adm/logout" method="POST" target="_top">
+<form name="constspace" action="/adm/logout" method="post" target="_top">
 <input type="hidden" name="filename" value="" />
 </form>
-<form name="cstrdelete" action="/adm/cfile" method="POST" target="_top">
+<form name="cstrdelete" action="/adm/cfile" method="post" target="_top">
 <input type="hidden" name="action" value="delete" /> 
 <input type="hidden" name="filename" value="" />
 </form>
-<form name="cstrprint" action="/adm/printout" target="_parent" method="POST">
+<form name="cstrprint" action="/adm/printout" target="_parent" method="post">
 <input type="hidden" name="postdata" value="" />
 <input type="hidden" name="curseed" value="" />
 <input type="hidden" name="problemtype" value="" />