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

raeburn raeburn at source.lon-capa.org
Sun Feb 19 19:36:40 EST 2017


raeburn		Mon Feb 20 00:36:40 2017 EDT

  Modified files:              
    /loncom/interface	lonhelpmenu.pm 
  Log:
  - URL for 'Go back' link in help banner needs to be encoded, not escaped.
  - Eliminate unused scalar in &display_help_banner() routine.
  
  
Index: loncom/interface/lonhelpmenu.pm
diff -u loncom/interface/lonhelpmenu.pm:1.44 loncom/interface/lonhelpmenu.pm:1.45
--- loncom/interface/lonhelpmenu.pm:1.44	Sun Jan  5 21:33:58 2014
+++ loncom/interface/lonhelpmenu.pm	Mon Feb 20 00:36:40 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # generate frame-based help system
 #
-# $Id: lonhelpmenu.pm,v 1.44 2014/01/05 21:33:58 raeburn Exp $
+# $Id: lonhelpmenu.pm,v 1.45 2017/02/20 00:36:40 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -36,6 +36,7 @@
 use Apache::lonnet;
 use lib '/home/httpd/lib/perl/';
 use LONCAPA;
+use HTML::Entities();
 
 sub handler {
     my ($r) = @_;
@@ -63,6 +64,7 @@
     }
     my $faqbaseurl = $Apache::lonnet::perlvar{'FAQHost'};
     my $origmail = $Apache::lonnet::perlvar{'lonSupportEMail'};
+    $origurl = &unescape($origurl);
     my $defdom;
     if ($env{'request.course.id'}) {
         $defdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
@@ -83,7 +85,6 @@
 
 sub display_help_banner {
     my ($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_;
-    my $location=&Apache::loncommon::lonhttpdurl("/adm");
     my $dom = $env{'request.role.domain'};
     my $scripttag = '';
     if ($requestmail) {
@@ -224,7 +225,7 @@
                                        text => $lt{'manuals_pdf'},
                                     },
                     lastloc  => {
-                                   href   => $origurl,
+                                   href   => &HTML::Entities::encode($origurl,'"&<>'),
                                    img    => '/res/adm/pages/tolastloc.png',
                                    alt    => $lt{'lastloc'},
                                    text   => $lt{'lastloc'},




More information about the LON-CAPA-cvs mailing list