[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /interface loncommon.pm

raeburn raeburn@source.lon-capa.org
Sun, 21 Dec 2008 15:32:31 -0000


raeburn		Sun Dec 21 15:32:31 2008 EDT

  Modified files:              (Branch: version_2_8_X)
    /loncom/interface	loncommon.pm 
  Log:
  - Backport 1.726. 
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.692.2.7 loncom/interface/loncommon.pm:1.692.2.8
--- loncom/interface/loncommon.pm:1.692.2.7	Fri Dec 19 00:16:15 2008
+++ loncom/interface/loncommon.pm	Sun Dec 21 15:32:30 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.692.2.7 2008/12/19 00:16:15 raeburn Exp $
+# $Id: loncommon.pm,v 1.692.2.8 2008/12/21 15:32:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3171,7 +3171,7 @@
     }
     $thisdir=~s-/[^/]*$--;
     foreach my $link (@rlinks) {
-	unless (($link=~/^http:\/\//i) ||
+	unless (($link=~/^https?\:\/\//i) ||
 		($link=~/^\//) ||
 		($link=~/^javascript:/i) ||
 		($link=~/^mailto:/i) ||
@@ -9533,7 +9533,7 @@
 # --- Get the symbolic name of a problem and the url
 sub get_symb {
     my ($request,$silent) = @_;
-    (my $url=$env{'form.url'}) =~ s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--;
+    (my $url=$env{'form.url'}) =~ s-^https?\://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--;
     my $symb=($env{'form.symb'} ne '' ? $env{'form.symb'} : (&Apache::lonnet::symbread($url)));
     if ($symb eq '') {
         if (!$silent) {