--- loncom/html/res/adm/pages/menu.html 2002/04/04 17:35:57 1.47
+++ loncom/html/res/adm/pages/menu.html 2002/04/05 18:47:42 1.48
@@ -4,7 +4,7 @@ The LearningOnline Network with CAPA
Remote Control
//
-// $Id: menu.html,v 1.47 2002/04/04 17:35:57 matthew Exp $
+// $Id: menu.html,v 1.48 2002/04/05 18:47:42 matthew Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -201,18 +201,17 @@ function setstatus(tp,bt) {
function cstrgo(currenturl,defaulturl) {
windowcheck();
var url;
- if (currenturl != null && currenturl != '') {
+ if (currenturl == null || currenturl == '') {
+ url = defaulturl;
+ } else {
url = currenturl;
- var priv_pattern = /^\/priv/;
- var tilda_pattern = /^\/~/;
- if (priv_pattern.test(url) || tilda_pattern.test(url)) {
- url = defaulturl;
- } else {
- // map /res/103/turtle -> /priv/turtle
+ var res_pattern = /^\/res\/[A-z0-p]+\//;
+ if (res_pattern.test(url)) {
+ // map /res/103/turtle to /priv/turtle
url = url.replace(/^\/res\/[A-z0-9]+\//,'/priv/');
+ } else {
+ url = defaulturl;
}
- } else {
- url = defaulturl;
}
this.document['led'].src="ledsend.gif";
if (url != '') {