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

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 23 Nov 2004 14:53:05 -0000


matthew		Tue Nov 23 09:53:05 2004 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  Bug 3623: Reversed part of revision 1.94 because it was double escaping.
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.97 loncom/interface/lonhtmlcommon.pm:1.98
--- loncom/interface/lonhtmlcommon.pm:1.97	Fri Nov 19 15:17:52 2004
+++ loncom/interface/lonhtmlcommon.pm	Tue Nov 23 09:53:05 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.97 2004/11/19 20:17:52 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.98 2004/11/23 14:53:05 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -908,12 +908,12 @@
 	    unless ($_) { next; }
 	    $path.=$_;
 	    unless ($path eq $uri) { $path.='/'; }
-	    my $linkpath=$path;
-	    if ($form) {
-		my $escaped_path = &Apache::loncommon::escape_single($path);
-		$linkpath="javascript:$form.action='$escaped_path';$form.submit();";
-	    }
-	    my $escaped_linkpath = &Apache::loncommon::escape_single($linkpath);
+            my $escaped_linkpath = &Apache::loncommon::escape_single($path);
+            if ($form) {
+		$escaped_linkpath="javascript:$form.action='".
+                    &Apache::loncommon::escape_single($path).
+                    "';$form.submit();";
+            }
 	    my $escaped_target   = &Apache::loncommon::escape_single($target);
 	    $output.='<a href="'.$escaped_linkpath.'"'.($target?' target="'.$escaped_target.'"':'').'>'.$_.'</a>/';
 	}