--- loncom/interface/lonhtmlcommon.pm 2007/11/16 06:31:26 1.170
+++ loncom/interface/lonhtmlcommon.pm 2007/11/17 01:46:03 1.171
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.170 2007/11/16 06:31:26 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.171 2007/11/17 01:46:03 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -645,6 +645,8 @@ sub javascript_nothing {
##############################################
##############################################
sub javascript_docopen {
+ my ($mimetype) = @_;
+ $mimetype ||= 'text/html';
# safari does not understand document.open() and loads "text/html"
my $nothing = "''";
my $user_browser;
@@ -658,7 +660,7 @@ sub javascript_docopen {
if ($user_browser eq 'safari' && $user_os =~ 'mac') {
$nothing = "document.clear()";
} else {
- $nothing = "document.open('text/html','replace')";
+ $nothing = "document.open('$mimetype','replace')";
}
return $nothing;
}