Apache-SdnFw
view release on metacpan or search on metacpan
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
break;
}
// Check required
if (ru.requiredAttribs) {
a = ru.requiredAttribs;
for (i = a.length - 1; i >= 0; i--) {
if (this.dom.getAttrib(n, a[i]) !== '')
break;
}
// None of the required was there
if (i == -1) {
iv = true;
break;
}
}
w.writeStartElement(nn);
// Add ordered attributes
if (ru.attribs) {
for (i=0, at = ru.attribs, l = at.length; i<l; i++) {
a = at[i];
v = t._getAttrib(n, a);
if (v !== null)
w.writeAttribute(a.name, v);
}
}
// Add wild attributes
if (ru.validAttribsRE) {
at = t.dom.getAttribs(n);
for (i=at.length-1; i>-1; i--) {
no = at[i];
if (no.specified) {
a = no.nodeName.toLowerCase();
if (s.invalid_attrs.test(a) || !ru.validAttribsRE.test(a))
continue;
ar = t.findAttribRule(ru, a);
v = t._getAttrib(n, ar, a);
if (v !== null)
w.writeAttribute(a, v);
}
}
}
// Keep type attribute
if (type && keep)
w.writeAttribute('_mce_type', type);
// Write text from script
if (nn === 'script' && tinymce.trim(n.innerHTML)) {
w.writeText('// '); // Padd it with a comment so it will parse on older browsers
w.writeCDATA(n.innerHTML.replace(/<!--|-->|<\[CDATA\[|\]\]>/g, '')); // Remove comments and cdata stuctures
hc = false;
break;
}
// Padd empty nodes with a
if (ru.padd) {
// If it has only one bogus child, padd it anyway workaround for <td><br /></td> bug
if (hc && (cn = n.firstChild) && cn.nodeType === 1 && n.childNodes.length === 1) {
if (cn.hasAttribute ? cn.hasAttribute('_mce_bogus') : cn.getAttribute('_mce_bogus'))
w.writeText('\u00a0');
} else if (!hc)
w.writeText('\u00a0'); // No children then padd it
}
break;
case 3: // Text
// Check if valid child
if (s.validate_children && t.elementName && !t.schema.isValid(t.elementName, '#text'))
return;
return w.writeText(n.nodeValue);
case 4: // CDATA
return w.writeCDATA(n.nodeValue);
case 8: // Comment
return w.writeComment(n.nodeValue);
}
} else if (n.nodeType == 1)
hc = n.hasChildNodes();
if (hc && !closed) {
cn = n.firstChild;
while (cn) {
t._serializeNode(cn);
t.elementName = nn;
cn = cn.nextSibling;
}
}
// Write element end
if (!iv) {
if (!closed)
w.writeFullEndElement();
else
w.writeEndElement();
}
},
_protect : function(o) {
var t = this;
o.items = o.items || [];
function enc(s) {
return s.replace(/[\r\n\\]/g, function(c) {
if (c === '\n')
return '\\n';
( run in 0.699 second using v1.01-cache-2.11-cpan-39bf76dae61 )