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

bisitz bisitz@source.lon-capa.org
Thu, 02 Jul 2009 17:05:31 -0000


bisitz		Thu Jul  2 17:05:31 2009 EDT

  Modified files:              
    /loncom/interface	lonsearchcat.pm 
  Log:
  XHTML: Properly escape "&" in URLs
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.308 loncom/interface/lonsearchcat.pm:1.309
--- loncom/interface/lonsearchcat.pm:1.308	Tue Jun 30 14:02:33 2009
+++ loncom/interface/lonsearchcat.pm	Thu Jul  2 17:05:31 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.308 2009/06/30 14:02:33 bisitz Exp $
+# $Id: lonsearchcat.pm,v 1.309 2009/07/02 17:05:31 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -191,9 +191,9 @@
     &Apache::lonhtmlcommon::add_breadcrumb
        ({href=>'/adm/searchcat?'.
 	       &Apache::loncommon::inhibit_menu_check().
-               '&catalogmode='.$env{'form.catalogmode'}.
-               '&launch='.$env{'form.launch'}.
-               '&mode='.$env{'form.mode'},
+               '&catalogmode='.$env{'form.catalogmode'}.
+               '&launch='.$env{'form.launch'}.
+               '&mode='.$env{'form.mode'},
               text=>"$crumb_text",
               target=>'_top',
               bug=>'Searching',});
@@ -314,19 +314,19 @@
         }
         &Apache::lonhtmlcommon::add_breadcrumb
             ({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check().
-		  '&phase=disp_adv'.
-                  '&catalogmode='.$env{'form.catalogmode'}.
-                  '&launch='.$env{'form.launch'}.
-                  '&mode='.$env{'form.mode'},
+                  '&phase=disp_adv'.
+                  '&catalogmode='.$env{'form.catalogmode'}.
+                  '&launch='.$env{'form.launch'}.
+                  '&mode='.$env{'form.mode'},
                   text=>"Advanced $srchtype Search",
                   bug=>'Searching',});
     } elsif ($env{'form.searchmode'} eq 'course search') {
         &Apache::lonhtmlcommon::add_breadcrumb
             ({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check().
-		  '&phase=disp_adv'.
+                  '&phase=disp_adv'.
                   'catalogmode='.$env{'form.catalogmode'}.
-                  '&launch='.$env{'form.launch'}.
-                  '&mode='.$env{'form.mode'},
+                  '&launch='.$env{'form.launch'}.
+                  '&mode='.$env{'form.mode'},
                   text=>"Course Search",
                   bug=>'Searching',});
     }
@@ -571,7 +571,7 @@
                         $url = '/res/'.$url;
                     }
                     if ($url =~ /\?/) {
-                        $url .= '&symb=';
+                        $url .= '&symb=';
                     } else {
                         $url .= '?symb=';
                     }
@@ -767,14 +767,14 @@
                         '</label>';
     $adv_search_link = '<a href="/adm/searchcat?'.
 	               &Apache::loncommon::inhibit_menu_check().
-		       '&phase=disp_adv'.
-                       '&catalogmode='.$env{'form.catalogmode'}.
-                       '&launch='.$env{'form.launch'}.
-                       '&mode='.$env{'form.mode'}.
-                       '&area='.$area.
-                       '&form='.$env{'form.form'}.
-                       '&titleelement='.$env{'form.titleelement'}.
-                       '&element='.$env{'form.element'}.
+		       '&amp;phase=disp_adv'.
+                       '&amp;catalogmode='.$env{'form.catalogmode'}.
+                       '&amp;launch='.$env{'form.launch'}.
+                       '&amp;mode='.$env{'form.mode'}.
+                       '&amp;area='.$area.
+                       '&amp;form='.$env{'form.form'}.
+                       '&amp;titleelement='.$env{'form.titleelement'}.
+                       '&amp;element='.$env{'form.element'}.
                        '">'.&mt('Advanced Search').'</a>';
     #
     $scrout.='<form name="loncapa_search" method="post" '.
@@ -2240,8 +2240,8 @@
 <script type="text/javascript">
     function change_sort() {
         var newloc = "/adm/searchcat?phase=results";
-        newloc += "&persistent_db_id=$env{'form.persistent_db_id'}";
-        newloc += "&sortby=";
+        newloc += "&amp;persistent_db_id=$env{'form.persistent_db_id'}";
+        newloc += "&amp;sortby=";
         newloc += document.forms.statusform.elements.sortby.value;
         parent.resultsframe.location= newloc;
     }
@@ -2454,8 +2454,8 @@
     $revise_phase = 'disp_adv' if ($env{'form.searchmode'} eq 'advanced');
     my $newloc = '/adm/searchcat'.
         '?persistent_db_id='.$env{'form.persistent_db_id'}.
-            '&cleargroupsort=1'.
-            '&phase='.$revise_phase;
+            '&amp;cleargroupsort=1'.
+            '&amp;phase='.$revise_phase;
     my $result = qq{<input type="button" value="$revisetext" name="revise"} .
         qq{ onClick="parent.location='$newloc';" /> };
     return $result;
@@ -2969,8 +2969,8 @@
             ('<center>'.
              &prev_next_buttons($min,$env{'form.show'},$total_results,
                                 "table=".$env{'form.table'}.
-                                "&phase=results".
-                                "&persistent_db_id=".
+                                "&amp;phase=results".
+                                "&amp;persistent_db_id=".
                                 $env{'form.persistent_db_id'})
              ."</center>\n"
              );
@@ -3260,7 +3260,7 @@
     }
     function select_group() {
 	parent.window.location=
-    "/adm/groupsort?mode=$env{'form.mode'}&catalogmode=import$inhibit_menu&acts="+
+    "/adm/groupsort?mode=$env{'form.mode'}&amp;catalogmode=import$inhibit_menu&amp;acts="+
 	    parent.statusframe.document.forms.statusform.elements.acts.value;
     }
 </script>
@@ -3277,10 +3277,10 @@
 }
 
 sub results_link {
-    my $basic_link   = "/adm/searchcat?"."&table=".$env{'form.table'}.
-        "&persistent_db_id=".$env{'form.persistent_db_id'};
-    my $results_link = $basic_link."&phase=results".
-        "&pause=1"."&start=1";
+    my $basic_link   = "/adm/searchcat?"."&amp;table=".$env{'form.table'}.
+        "&amp;persistent_db_id=".$env{'form.persistent_db_id'};
+    my $results_link = $basic_link."&amp;phase=results".
+        "&amp;pause=1"."&amp;start=1";
     return $results_link;
 }
 
@@ -3288,9 +3288,9 @@
 ######################################################################
 sub print_frames_interface {
     my $r = shift;
-    my $basic_link = "/adm/searchcat?"."&table=".$env{'form.table'}.
-        "&persistent_db_id=".$env{'form.persistent_db_id'};
-    my $run_search_link = $basic_link."&phase=run_search";
+    my $basic_link = "/adm/searchcat?"."&amp;table=".$env{'form.table'}.
+        "&amp;persistent_db_id=".$env{'form.persistent_db_id'};
+    my $run_search_link = $basic_link."&amp;phase=run_search";
     my $results_link = &results_link();
     my $js = <<JS;
 <script type="text/javascript">
@@ -3770,7 +3770,7 @@
 $errorstring
 </p>
 <p>
-<a href="/adm/searchcat?$parms&persistent_db_id=$env{'form.persistent_db_id'}">$revise</a>
+<a href="/adm/searchcat?$parms&amp;persistent_db_id=$env{'form.persistent_db_id'}">$revise</a>
 </p>
 $end_page
 ENDPAGE
@@ -3814,7 +3814,7 @@
 $errormsg
 </p>
 <p>
-<a href="/adm/searchcat?$parms&persistent_db_id=$env{'form.persistent_db_id'}">$revise</a>&nbsp;
+<a href="/adm/searchcat?$parms&amp;persistent_db_id=$env{'form.persistent_db_id'}">$revise</a>&nbsp;
 </p>
 $end_page
 ENDPAGE