--- loncom/interface/londocs.pm 2018/12/27 20:10:31 1.657
+++ loncom/interface/londocs.pm 2018/12/30 19:47:02 1.659
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.657 2018/12/27 20:10:31 raeburn Exp $
+# $Id: londocs.pm,v 1.659 2018/12/30 19:47:02 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4183,9 +4183,8 @@ END
if ($url =~ /^([^#]+)#([^#]+)$/) {
$url = $1;
$anchor = $2;
- if ($symb =~ m{^([^#]+)\Q#$anchor\E$}) {
- $shownsymb = $1.&escape('#').$anchor;
- }
+ my $escan = &escape('#');
+ $shownsymb =~ s/^([^\#]+)#([^\#]+)$/$1$escan$2/;
}
}
unless ($env{'request.role.adv'}) {
@@ -4437,8 +4436,7 @@ $form_end;
} else {
$link = $url;
}
- $link = &js_escape($link.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'.
- (($anchor ne '')?$anchor:''));
+ $link = &js_escape($link.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'.$anchor);
if ($nomodal) {
$line.=''.
'
';
@@ -7289,7 +7287,10 @@ sub editing_js {
} elsif ($backtourl =~ m{^/adm/wrapper/ext/(?!https:)}) {
if (($ENV{'SERVER_PORT'} == 443) && ($hostname ne '')) {
unless (&Apache::lonnet::uses_sts()) {
- $backtourl = 'http://'.$hostname.$backtourl;
+ if ($hostname ne '') {
+ $backtourl = 'http://'.$hostname.$backtourl;
+ }
+ $backtourl .= (($backtourl =~ /\?/) ? '&':'?').'usehttp=1';
}
}
}