]> git.mjollnir.org Git - moodle.git/commitdiff
Bug fix for Bug #2222
authorjulmis <julmis>
Sat, 15 Jan 2005 18:50:38 +0000 (18:50 +0000)
committerjulmis <julmis>
Sat, 15 Jan 2005 18:50:38 +0000 (18:50 +0000)
lib/editor/htmlarea.php

index ebee5176302d6040fa99a23a9a6b8143ebe2bae0..d6e172c4de5a1a4383d721c875dcbbe006b7b0d1 100644 (file)
@@ -174,6 +174,7 @@ HTMLArea.Config = function () {
     };
 
     this.formatblock = {
+        "":"",
         "<?php echo $strheading ?> 1": "h1",
         "<?php echo $strheading ?> 2": "h2",
         "<?php echo $strheading ?> 3": "h3",
@@ -662,7 +663,8 @@ HTMLArea.prototype.generate = function () {
         html += '<style type="text/css">\n' + editor.config.pageStyle + "td { border: 1px dotted gray; }</style>\n";
         html += "</head>\n";
         html += '<body>\n';
-        html += editor._textArea.value;
+        // See bug #2222
+        html += (editor._textArea.value != null && editor._textArea.value != '') ? editor._textArea.value : '<p>&nbsp;</p>';
         html += "</body>\n";
         html += "</html>";
     } else {