Project

General

Profile

Bug #29855 » patch.diff

patch for htmlarea.js (add sorting) - Bart Dubelaar, 2011-09-26 10:42

View differences:

htmlarea.js 2011-09-23 17:28:18.252449694 +0200
}
// Normal node
var attributes = this.getAttributes(node);
var attributeArray = new Array();
for (var attributeName in attributes) {
html += ' ' + attributeName + '="' + HTMLArea.htmlEncode(attributes[attributeName]) + '"';
attributeArray.push(attributeName);
}
attributeArray.sort();
for (var i = 0; i < attributeArray.length; i++) {
var attributeName = attributeArray[i];
html += ' ' + attributeName + '="' + HTMLArea.htmlEncode(attributes[attributeName]) + '"';
}
html = '<' + node.nodeName.toLowerCase() + html + (HTMLArea.RE_noClosingTag.test(node.nodeName) ? ' />' : '>');
// Fix orphan list elements
(2-2/2)