--- loncom/interface/lonextresedit.pm 2019/05/02 02:12:18 1.28 +++ loncom/interface/lonextresedit.pm 2022/09/09 14:24:30 1.30 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: lonextresedit.pm,v 1.28 2019/05/02 02:12:18 raeburn Exp $ +# $Id: lonextresedit.pm,v 1.30 2022/09/09 14:24:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -424,9 +424,9 @@ sub extedit_form { $rows = 10; $cols = 45; if ($type eq 'tool') { - $legend = $lt{'ee'}; - } else { $legend = $lt{'te'}; + } else { + $legend = $lt{'ee'}; } $legend = ''.$legend.''; if ($symb) { @@ -981,12 +981,14 @@ function extUrlPreview(caller,protocol) http.onreadystatechange = function() { if (http.readyState == 4) { if (http.status == 200) { - if (http.responseText == 1) { - noiframe = 1; - } else if (http.responseText == -1) { - nopriv = 1; - } else if (http.responseText == 0) { - badurl = 1; + if (http.responseText.length > 0) { + if (http.responseText == 1) { + noiframe = 1; + } else if (http.responseText == -1) { + nopriv = 1; + } else if (http.responseText == 0) { + badurl = 1; + } } openPreviewWindow(url,name,noiframe,mixed,nopriv,badurl); }