}
elBySelAll('span', div, function (span) {
- if (!span.style.length || !span.hasAttribute('style')) {
+ if (!span.hasAttribute('style') || !span.style.length) {
while (span.childNodes.length) {
span.parentNode.insertBefore(span.childNodes[0], span);
}
}
// discard classes and styles, they're stripped later on anyway
- p.className = '';
+ p.removeAttribute('class');
p.removeAttribute('style');
});
+ elBySelAll('img', div, function (img) {
+ img.removeAttribute('style');
+ });
+
elBySelAll('br', div, function (br) {
br.parentNode.insertBefore(document.createTextNode('@@@WOLTLAB-BR-MARKER@@@'), br.nextSibling);
});
return '';
});
- div.innerHTML = html;
+ div.innerHTML = html.replace(/"/g, '"');
elBySelAll('woltlab-br-marker', div, function (marker) {
var parent = marker.parentNode;