rem: case 1: case 11: var closed; var i; if (outputRoot) { closed = (!(root.hasChildNodes() || HTMLArea.needsClosingTag(root))); html = "<" + root.tagName.toLowerCase(); var attrs = root.attributes; for (i = 0; i < attrs.length; ++i) { var a = attrs.item(i); if (!a.specified) { continue; 
add: case 1: case 11: var closed; var i; var root_tag = (root.nodeType == 1) ? root.tagName.toLowerCase() : ''; if (HTMLArea.is_ie && root_tag == "head") { if (outputRoot) html += "<head>";  var save_multiline = RegExp.multiline; RegExp.multiline = true; var txt = root.innerHTML.replace(HTMLArea.RE_tagName, function(str, p1, p2) { return p1 + p2.toLowerCase(); }); RegExp.multiline = save_multiline; html += txt; if (outputRoot) html += "</head>"; break; } else if (outputRoot) { closed = (!(root.hasChildNodes() || HTMLArea.needsClosingTag(root))); html = "<" + root.tagName.toLowerCase(); var attrs = root.attributes; for (i = 0; i < attrs.length; ++i) { var a = attrs.item(i); if (!a.specified) { continue; } var name = a.nodeName.toLowerCase(); if (/_moz|contenteditable/.test(name)) {  continue; } var value; if (name != "style") {           if (typeof root[a.nodeName] != "undefined" && name != "href" && name != "src") { value = root[a.nodeName]; } else { value = a.nodeValue;    if (HTMLArea.is_ie && (name == "href" || name == "src")) { value = editor.stripBaseURL(value); } } } else {  value = root.style.cssText; } if (/(_moz|^$)/.test(value)) {   continue; } html += " " + name + '="' + value + '"'; 
context: HTMLArea.getHTML = function(root, outputRoot) {	var html = "";	switch (root.nodeType) {	    case 1: // Node.ELEMENT_NODE	    case 11: // Node.DOCUMENT_FRAGMENT_NODE		var closed;		var i;		if (outputRoot) {			closed = (!(root.hasChildNodes() || HTMLArea.needsClosingTag(root)));			html = "<" + root.tagName.toLowerCase();			var attrs = root.attributes;			for (i = 0; i < attrs.length; ++i) {				var a = attrs.item(i);				if (!a.specified) {					continue;				}				var name = a.nodeName.toLowerCase();				if (/_moz/.test(name)) {					// Mozilla reports some special tags					// here; we don't need them.					continue;				}				var value;				if (name != "style") {					// IE5.5 reports 25 when cellSpacing is					// 1; other values might be doomed too.					// For this reason we extract the					// values directly from the root node.					// I'm starting to HATE JavaScript					// development.  Browser differences					// suck.					if (typeof root[a.nodeName] != "undefined") {						value = root[a.nodeName];					} else {						value = a.nodeValue;					}				} else { // IE fails to put style in attributes list					// FIXME: cssText reported by IE is UPPERCASE					value = root.style.cssText;				}				if (/_moz/.test(value)) {					// Mozilla reports some special tags					// here; we don't need them.					continue;				}				html += " " + name + '="' + value + '"';			}			html += closed ? " />" : ">";		}		for (i = root.firstChild; i; i = i.nextSibling) {			html += HTMLArea.getHTML(i, true);		}		if (outputRoot && !closed) {			html += "</" + root.tagName.toLowerCase() + ">";		}		break;	    case 3: // Node.TEXT_NODE		html = HTMLArea.htmlEncode(root.data);		break;	    case 8: // Node.COMMENT_NODE		html = "<!--" + root.data + "-->";		break;		// skip comments, for now.	}	return html;};
meta: 6230	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6230/e9ff05661c4fa38c1e8ce4b72bf5b0a3bb5e0842/htmlarea.js/buggy/phpgwapi/js/htmlarea/htmlarea.js