Diff for /loncom/html/htmlarea/Attic/htmlarea.js between versions 1.3 and 1.5

version 1.3, 2004/06/01 23:46:10 version 1.5, 2005/02/17 08:59:45
Line 1816  HTMLArea.cloneObject = function(obj) { Line 1816  HTMLArea.cloneObject = function(obj) {
 HTMLArea.checkSupportedBrowser = function() {  HTMLArea.checkSupportedBrowser = function() {
  if (HTMLArea.is_gecko) {   if (HTMLArea.is_gecko) {
  if (navigator.productSub < 20021201) {   if (navigator.productSub < 20021201) {
  alert("You need at least Mozilla-1.3 Alpha.\n" +   window.status="WYSIWYG Editor: You need at least Mozilla-1.3 Alpha. " +
       "Sorry, your Gecko is not supported.");        "Sorry, your Gecko is not supported.";
  return false;   return false;
  }   }
  if (navigator.productSub < 20030210) {   if (navigator.productSub < 20030210) {
  alert("Mozilla < 1.3 Beta is not supported!\n" +   window.status="WYSIWYG Editor: Mozilla < 1.3 Beta is not supported! " +
       "I'll try, though, but it might not work.");        "I'll try, though, but it might not work.";
  }   }
  }   }
  return HTMLArea.is_gecko || HTMLArea.is_ie;   return HTMLArea.is_gecko || HTMLArea.is_ie;
Line 2038  HTMLArea.getHTML = function(root, output Line 2038  HTMLArea.getHTML = function(root, output
     case 3: // Node.TEXT_NODE      case 3: // Node.TEXT_NODE
  // If a text node is alone in an element and all spaces, replace it with an non breaking one   // If a text node is alone in an element and all spaces, replace it with an non breaking one
  // This partially undoes the damage done by moz, which translates '&nbsp;'s into spaces in the data element   // This partially undoes the damage done by moz, which translates '&nbsp;'s into spaces in the data element
  if ( !root.previousSibling && !root.nextSibling && root.data.match(/^\s*$/i) ) html = '&nbsp;';   // this was &nbsp; but since are document encodings are all over the place it causes random havoc
    if ( !root.previousSibling && !root.nextSibling && root.data.match(/^\s*$/i) ) html = ' ';
  else html = HTMLArea.htmlEncode(root.data);   else html = HTMLArea.htmlEncode(root.data);
  break;   break;
     case 8: // Node.COMMENT_NODE      case 8: // Node.COMMENT_NODE

Removed from v.1.3  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>