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

raeburn raeburn at source.lon-capa.org
Mon Feb 17 08:40:16 EST 2020


raeburn		Mon Feb 17 13:40:16 2020 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - Accommodate Apache 2.4 updated to address CVE-2019-0220, in which 
    multiple consecutive slashes are collapsed into a single slash.
  - Eliminate TeX error when printing External Resource which includes an
    anchor in the URL. 
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.669 loncom/interface/lonprintout.pm:1.670
--- loncom/interface/lonprintout.pm:1.669	Sun Feb 17 03:42:24 2019
+++ loncom/interface/lonprintout.pm	Mon Feb 17 13:40:16 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.669 2019/02/17 03:42:24 raeburn Exp $
+# $Id: lonprintout.pm,v 1.670 2020/02/17 13:40:16 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2076,12 +2076,13 @@
     my $result.= &print_latex_header($mode);
     if ($currentURL=~m|^(/adm/wrapper/)?ext/|) {
 	$currentURL=~s|^(/adm/wrapper/)?ext/|http://|;
-        $currentURL=~s|^http://https://|https://|;
+        $currentURL=~s|^http://https://?|https://|;
 	my $title=&Apache::lonnet::gettitle($symb);
 	$title = &Apache::lonxml::latex_special_symbols($title);
-	$result.=' \strut \\\\ '.$title.' \strut \\\\ '.$currentURL.' ';
+        my $url =  &Apache::lonxml::latex_special_symbols($currentURL);
+	$result.=' \strut \\\\ '.$title.' \strut \\\\ '.$url.' ';
     } else {
-	$result.=$currentURL;
+	$result.= &Apache::lonxml::latex_special_symbols($currentURL);
     }
     $result.= '\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill} \end{document}';
     return $result;




More information about the LON-CAPA-cvs mailing list