You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2014/02/17 21:17:56 UTC

git commit: WICKET-5504 AjaxRequestTarget.append/prependJavaScript cannot handle scripts with new-lines anymore

Repository: wicket
Updated Branches:
  refs/heads/master 32a665d7b -> 87df7f443


WICKET-5504 AjaxRequestTarget.append/prependJavaScript cannot handle scripts with new-lines anymore


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

Branch: refs/heads/master
Commit: 87df7f443d4d5403fb304fc1272953189d411596
Parents: 32a665d
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Feb 17 22:14:32 2014 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Feb 17 22:14:32 2014 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js | 2 +-
 .../src/test/js/data/ajax/evaluationIdentifierAndCodeId.xml       | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/87df7f44/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 3f769d7..bbe1797 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
@@ -1066,7 +1066,7 @@
 			 * when there are scripts which require manual call of 'FunctionExecutor#notify()'
 			 * @type {RegExp}
 			 */
-			var scriptSplitterR = new RegExp("\\(function\\(\\)\\{.*?}\\)\\(\\);", 'gi');
+			var scriptSplitterR = new RegExp("\\(function\\(\\)\\{[\\s\\S]*?}\\)\\(\\);", 'gi');
 
 			// get the javascript body
 			var text = Wicket.DOM.text(node);

http://git-wip-us.apache.org/repos/asf/wicket/blob/87df7f44/wicket-core/src/test/js/data/ajax/evaluationIdentifierAndCodeId.xml
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/js/data/ajax/evaluationIdentifierAndCodeId.xml b/wicket-core/src/test/js/data/ajax/evaluationIdentifierAndCodeId.xml
index 04698b2..c8155c3 100644
--- a/wicket-core/src/test/js/data/ajax/evaluationIdentifierAndCodeId.xml
+++ b/wicket-core/src/test/js/data/ajax/evaluationIdentifierAndCodeId.xml
@@ -15,4 +15,5 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<ajax-response><evaluate>(function(){ignored|start(); ok(true, 'Evaluation with identifier must be executed!'); equal(typeof(ignored), 'function', 'The passed identifier must be a function'); arguments[0]();})();</evaluate></ajax-response>
\ No newline at end of file
+<ajax-response><evaluate>(function(){ignored|start(); ok(true, 'Evaluation with identifier must be executed!');
+    equal(typeof(ignored), 'function', 'The passed identifier must be a function'); arguments[0]();})();</evaluate></ajax-response>