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

foxr lon-capa-cvs@mail.lon-capa.org
Thu, 17 Nov 2005 11:32:31 -0000


foxr		Thu Nov 17 06:32:31 2005 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Use " to quote href='s for resources rather than '  this works better
  because " is not allowed in resource names, but ' is and ' seems
  not to be properly esCaped in the href links.   This (I think)
  deals with bug 442.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.348 loncom/interface/lonnavmaps.pm:1.349
--- loncom/interface/lonnavmaps.pm:1.348	Wed Nov 16 16:09:33 2005
+++ loncom/interface/lonnavmaps.pm	Thu Nov 17 06:32:30 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.348 2005/11/16 21:09:33 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.349 2005/11/17 11:32:30 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1065,7 +1065,6 @@
     #  it will be quoted with ' in the href.
 
     my ($left,$right) = split(/\?/, $link);
-    $left =~ s/'/\\'/g;
     $link = $left.'?'.$right;
 
     my $src = $resource->src();
@@ -1085,7 +1084,7 @@
     # links to open and close the folder
 
     
-    my $linkopen = "<a href='$link'>";
+    my $linkopen = "<a href=\"$link\">";
 
 
     my $linkclose = "</a>";
@@ -1118,7 +1117,7 @@
 	    $icon = "<img src='$location/$icon' alt='".
 		($nowOpen ? 'Open Folder' : 'Close Folder')."' border='0' />";
 
-            $linkopen = "<a href='" . $params->{'url'} . '?' . 
+            $linkopen = "<a href=\"" . $params->{'url'} . '?' . 
                 $params->{'queryString'} . '&filter=';
             $linkopen .= ($nowOpen xor $it->{CONDITION}) ?
                 addToFilter($filter, $mapId) :
@@ -1128,7 +1127,7 @@
                 &Apache::lonnet::escape($params->{'here'}) . 
                 '&jump=' .
                 &Apache::lonnet::escape($resource->symb()) . 
-                "&folderManip=1'>";
+                "&folderManip=1\">";
 
         } else {
             # Don't allow users to manipulate folder
@@ -1192,7 +1191,7 @@
 	$target=' target="loncapaclient" ';
     }
     if (!$params->{'resource_nolink'} && !$resource->is_sequence() && !$resource->is_empty_sequence) {
-        $result .= "  $curMarkerBegin<a $target href='$link'>$title$partLabel</a>$curMarkerEnd $nonLinkedText</td>";
+        $result .= "  $curMarkerBegin<a $target href=\"$link\">$title$partLabel</a>$curMarkerEnd $nonLinkedText</td>";
     } else {
         $result .= "  $curMarkerBegin$title$partLabel$curMarkerEnd $nonLinkedText</td>";
     }
@@ -1209,7 +1208,7 @@
     if ($env{'environment.remotenavmap'} eq 'on') {
 	$target=' target="loncapaclient" ';
     }
-    my $linkopen = "<a $target href='$link'>";
+    my $linkopen = "<a $target href=\"$link\">";
     my $linkclose = "</a>";
     my $location=&Apache::loncommon::lonhttpdurl("/adm/lonMisc");
     if ($resource->hasDiscussion()) {
@@ -1263,7 +1262,7 @@
     if ($env{'environment.remotenavmap'} eq 'on') {
 	$target=' target="loncapaclient" ';
     }
-    my $linkopen = "<a $target href='$link'>";
+    my $linkopen = "<a $target href=\"$link\">";
     my $linkclose = "</a>";
 
     if ($resource->is_problem() &&