Updated Branches: refs/heads/master 57e173d30 -> 0e42c96aa
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/0e42c96a Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0e42c96a Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0e42c96a Branch: refs/heads/master Commit: 0e42c96aa80c11395fd20b43c85760a789c5fcd9 Parents: 57e173d Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Mon Mar 19 16:43:49 2012 +0200 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Mon Mar 19 16:43:49 2012 +0200 ---------------------------------------------------------------------- .../wicket/ajax/res/js/wicket-ajax-jquery.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/0e42c96a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js index 3cfb02b..83548da 100644 --- a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js +++ b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js @@ -1804,8 +1804,8 @@ // 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");
