add:  if (tinyMCE.isGecko && !tinyMCE.settings['relative_urls']) attribValue = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], attribValue);  
context: function TinyMCE__cleanupAttribute(valid_attributes, element_name, attribute_node, element_node) {	var attribName = attribute_node.nodeName.toLowerCase();	var attribValue = attribute_node.nodeValue;	var attribMustBeValue = null;	var verified = false;	// Inline styling, skip them	if (tinyMCE.cleanup_inline_styles && element_name != "table" && element_name != "td") {		if (attribName == "width" || attribName == "height" || attribName == "border" || attribName == "align" || attribName == "valign" || attribName == "hspace" || attribName == "vspace")			return null;	}	// Mozilla attibute, remove them	if (attribName.indexOf('moz_') != -1)		return null;	// Mozilla fix for drag-drop/copy/paste images	if (!tinyMCE.isMSIE && (attribName == "mce_real_href" || attribName == "mce_real_src")) {		if (!tinyMCE.cleanup_on_save) {			var attrib = new Object();			attrib.name = attribName;			attrib.value = attribValue;			return attrib;		} else			return null;	}	// Auto verify 	if (attribName == "mce_onclick")		verified = true;	// Verify attrib	if (tinyMCE.cleanup_verify_html && !verified) {		for (var i=1; i<valid_attributes.length; i++) {			var attribMatch = valid_attributes[i][0];			var re = null;			// Build regexp from wildcard			if (attribMatch.match(new RegExp('\\*|\\?|\\+', 'g')) != null) {				attribMatch = attribMatch.replace(new RegExp('\\?', 'g'), '(\\S?)');				attribMatch = attribMatch.replace(new RegExp('\\+', 'g'), '(\\S+)');				attribMatch = attribMatch.replace(new RegExp('\\*', 'g'), '(\\S*)');				attribMatch = "^" + attribMatch + "$";				re = new RegExp(attribMatch, 'g');			}			if ((re && attribName.match(re) != null) || attribName == attribMatch) {				verified = true;				attribMustBeValue = valid_attributes[i][3];				break;			}		}		// Allways pass styles on table and td elements if visual_aid		if ((element_name == "table" || element_name == "td") && attribName == "style")			verified = true;		if (!verified)			return false;	} else		verified = true;	// Treat some attribs diffrent	switch (attribName) {		case "size":			if (tinyMCE.isMSIE5 && element_name == "font")				attribValue = element_node.size;			break;		case "color":			if (tinyMCE.isMSIE5 && element_name == "font")				attribValue = element_node.color;			break;		case "width":			// MSIE 5.5 issue			if (tinyMCE.isMSIE)				attribValue = element_node.width;			break;		case "height":			// MSIE 5.5 issue			if (tinyMCE.isMSIE)				attribValue = element_node.height;			break;		case "border":			// MSIE 5.5 issue			if (tinyMCE.isMSIE)				attribValue = element_node.border;			break;//		case "className":		case "class":			if (!tinyMCE._verifyClass(element_node))				return null;//			if (tinyMCE.isMSIE)//				attribValue = node.getAttribute('className');			break;		case "style":			if (element_name == "table" || element_name == "td") {				// Handle visual aid				if (tinyMCE.cleanup_visual_table_style != "") {					// Find parent table					var tableElement = element_node;					if (element_name == "td")						tableElement = tinyMCE.getParentElement(tableElement, "table");					if (tableElement && tableElement.getAttribute("border") == 0) {						if (tinyMCE.cleanup_visual_aid)							attribValue = tinyMCE.cleanup_visual_table_style;						else							return null;					}				}			} else				attribValue = element_node.style.cssText.toLowerCase();			// Compress borders some			if (tinyMCE.isMSIE) {				var border = element_node.style.border;				var bt = element_node.style.borderTop;				var bl = element_node.style.borderLeft;				var br = element_node.style.borderRight;				var bb = element_node.style.borderBottom;				// All the same				if (border != "" && (bt == border && bl == border && br == border && bb == border)) {					attribValue = tinyMCE.regexpReplace(attribValue, 'border-top: ' + border + '?; ?', '');					attribValue = tinyMCE.regexpReplace(attribValue, 'border-left: ' + border  + '?; ?', '');					attribValue = tinyMCE.regexpReplace(attribValue, 'border-right: ' + border  + '?; ?', '');					attribValue = tinyMCE.regexpReplace(attribValue, 'border-bottom: ' + border + '?;( ?)', 'border: ' + border + ';$1');				}			}			break;		// Handle onclick		case "onclick":		case "mce_onclick":			// Skip on MSIE < 6+			if (tinyMCE.isMSIE5)				break;			// Fix onclick attrib			if (tinyMCE.cleanup_on_save) {				if (element_node.getAttribute("mce_onclick")) {					attribName = "onclick";					attribValue = "" + element_node.getAttribute("mce_onclick");				}			} else {				if (attribName == "onclick" && !tinyMCE.cleanup_on_save)					return null;			}			break;		// Convert the URLs of these		case "href":		case "src":			// Fix for dragdrop/copy paste Mozilla issue			if (!tinyMCE.isMSIE && attribName == "href" && element_node.getAttribute("mce_real_href"))				attribValue = element_node.getAttribute("mce_real_href");			// Fix for dragdrop/copy paste Mozilla issue			if (!tinyMCE.isMSIE && attribName == "src" && element_node.getAttribute("mce_real_src"))				attribValue = element_node.getAttribute("mce_real_src");			attribValue = eval(tinyMCE.cleanup_urlconvertor_callback + "(attribValue, element_node, tinyMCE.cleanup_on_save);");			break;		case "colspan":		case "rowspan":			// Not needed			if (attribValue == "1")				return null;			break;		// Skip these		case "_moz-userdefined":		case "editorid":		case "editor_id":		case "mce_real_href":		case "mce_real_src":			return null;	}	// Not the must be value	if (attribMustBeValue != null) {		var isCorrect = false;		for (var i=0; i<attribMustBeValue.length; i++) {			if (attribValue == attribMustBeValue[i]) {				isCorrect = true;				break;			}		}		if (!isCorrect)			return null;	}	var attrib = new Object();	attrib.name = attribName;	attrib.value = attribValue;	return attrib;}
meta: 5314	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5314/914f29b169169eaf678616905b5062afd73de30a/tiny_mce_src.js/buggy/www/extras/tinymce/jscripts/tiny_mce/tiny_mce_src.js