Updated Branches:
  refs/heads/wicket-1.5.x 9dde3b27e -> 8a1a25b8a

WICKET-4446 processScript in Wicket.Head.Contributor doesn't remove CDATA - 
eval fails in IE

Update the regex to handle the new CDATA comments in JavaScriptUtils


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/8a1a25b8
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/8a1a25b8
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/8a1a25b8

Branch: refs/heads/wicket-1.5.x
Commit: 8a1a25b8aecb69f9c05728089ea3bc81b3f83b24
Parents: 9dde3b2
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Mon Mar 19 16:46:32 2012 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Mon Mar 19 16:46:32 2012 +0200

----------------------------------------------------------------------
 .../java/org/apache/wicket/ajax/wicket-ajax.js     |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/8a1a25b8/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js 
b/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
index 91c425f..06eeba5 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
@@ -1739,8 +1739,8 @@ Wicket.Head.Contributor.prototype = {
                                // serialize the element content to string
                                var text = 
Wicket.DOM.serializeNodeChildren(node);
                                // get rid of prefix and suffix, they are not 
eval-d correctly
-                               text = 
text.replace(/^<!--\/\*--><!\[CDATA\[\/\*><!--\*\//, "");
-                               text = text.replace(/\/\*-->]]>\*\/$/, "");
+                               text = text.replace(/^\n\/\*<!\[CDATA\[\*\/\n/, 
"");
+                               text = text.replace(/\n\/\*\]\]>\*\/\n$/, "");
                                
                                var id = node.getAttribute("id");
                                

Reply via email to