Author: ivaynberg Date: Thu Feb 25 16:07:02 2010 New Revision: 916334 URL: http://svn.apache.org/viewvc?rev=916334&view=rev Log: WICKET-2759 handle more then one CDATA in ajax response in case something splits it
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=916334&r1=916333&r2=916334&view=diff ============================================================================== --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Thu Feb 25 16:07:02 2010 @@ -1306,9 +1306,11 @@ // get the new component body if (node.hasChildNodes()) { - text = node.firstChild.nodeValue; + for( i=0 ; i < node.childNodes.length; i++ ) { + text = text + node.childNodes[i].nodeValue; + } } - + // if the text was escaped, unascape it // (escaping is done when the component body contains a CDATA section) var encoding = node.getAttribute("encoding");