SVN commit 1076387 by ggarand: port patch from Alexey Proskuryakov "HTML tags are wrongfully parsed when setting innerHTML of a SCRIPT element" WC/r53023/#32962/ M +7 -0 html_elementimpl.cpp --- trunk/KDE/kdelibs/khtml/html/html_elementimpl.cpp #1076386:1076387 @@ -508,6 +508,13 @@ void HTMLElementImpl::setInnerHTML( const DOMString &html, int &exceptioncode ) { + if (id() == ID_SCRIPT || id() == ID_STYLE) { + // Script and CSS source shouldn't be parsed as HTML. + removeChildren(); + appendChild(document()->createTextNode(html), exceptioncode); + return; + } + DocumentFragment fragment = createContextualFragment( html ); if ( fragment.isNull() ) { exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;