--- loncom/interface/lonhtmlcommon.pm 2018/04/24 13:40:32 1.393 +++ loncom/interface/lonhtmlcommon.pm 2018/12/27 20:10:31 1.394 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.393 2018/04/24 13:40:32 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.394 2018/12/27 20:10:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3508,7 +3508,16 @@ function go(url) { currentURL = null; currentSymb= null; var lcHostname = setLCHost(); - window.location.href=lcHostname+url; + if (lcHostname!='' && lcHostname!= null) { + var RegExp = /^https?\:/; + if (RegExp.test(url)) { + window.location.href=url; + } else { + window.location.href=lcHostname+url; + } + } else { + window.location.href=url; + } } } @@ -3554,7 +3563,9 @@ sub jump_to_editres { $anchor = $3; $is_ext = 1; if (($extlink !~ /^https:/) && ($ENV{'SERVER_PORT'} == 443)) { - $usehttp = 1; + unless (&Apache::lonnet::uses_sts()) { + $usehttp = 1; + } } elsif ($env{'request.use_absolute'}) { if ($env{'request.use_absolute'} =~ m{^https://}) { $usehttps = 1; @@ -3567,7 +3578,9 @@ sub jump_to_editres { ($env{'course.'.$env{'request.course.id'}.'.num'} eq $cnum) && ($env{'course.'.$env{'request.course.id'}.'.domain'} eq $cdom)) { if ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://}) { - $usehttp = 1; + unless (&Apache::lonnet::uses_sts()) { + $usehttp = 1; + } } } } elsif ($env{'request.use_absolute'}) {