You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2013/06/19 00:34:29 UTC
[4/8] git commit: Remove t5/core/dom:escapeHTML, just use _.escape
Remove t5/core/dom:escapeHTML, just use _.escape
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/341bd0a7
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/341bd0a7
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/341bd0a7
Branch: refs/heads/master
Commit: 341bd0a71e0bf6552a9402119b8172fff8f2ca0e
Parents: 56a24f5
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Jun 18 13:47:52 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Jun 18 13:47:52 2013 -0700
----------------------------------------------------------------------
.../src/main/coffeescript/META-INF/modules/t5/core/alert.coffee | 4 ++--
.../main/coffeescript/META-INF/modules/t5/core/builder.coffee | 2 +-
.../main/coffeescript/META-INF/modules/t5/core/console.coffee | 4 ++--
.../main/coffeescript/META-INF/modules/t5/core/datefield.coffee | 2 +-
.../org/apache/tapestry5/t5-core-dom.coffee | 3 ---
5 files changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/341bd0a7/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
index 1e4711d..9ae64f4 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
@@ -1,4 +1,4 @@
-# Copyright 2012 The Apache Software Foundation
+# Copyright 2012-2013 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -103,7 +103,7 @@ define ["./dom", "./console", "./messages", "./builder", "./ajax", "underscore"]
className = severityToClass[data.severity] or "alert"
- content = if data.markup then data.message else dom.escapeHTML data.message
+ content = if data.markup then data.message else _.escape data.message
# Note that `data-dismiss=alert` is purposely excluded
# - we want to handle closes w/ notifications to the server if not transient
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/341bd0a7/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/builder.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/builder.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/builder.coffee
index 2f4b735..83bfaef 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/builder.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/builder.coffee
@@ -36,7 +36,7 @@
# * Strings: literal markup text
# * Array: a nested element definition
#
-# Literal text is NOT escaped. You should be careful to use `t5/core/dom:escapeHTML` if the body contains
+# Literal text is NOT escaped. You should be careful to use Underscore's `escape()` if the body contains
# any potential markup that should be escaped; alternately, it may be easier to use embedded markup in the body
# than to use an element definition.
#
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/341bd0a7/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
index 17724ca..88ee4d8 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
@@ -1,4 +1,4 @@
-# Copyright 2012 The Apache Software Foundation
+# Copyright 2012-2013 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ define ["./dom", "./builder", "underscore"], (dom, builder, _) ->
floatingConsole = builder ".t-console"
dom.body().prepend floatingConsole
- div = builder ".t-console-entry.#{className}", (dom.escapeHTML message)
+ div = builder ".t-console-entry.#{className}", (_.escape message)
floatingConsole.append div.hide().fadeIn FADE_DURATION
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/341bd0a7/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee
index 4353fae..d51a430 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee
@@ -102,7 +102,7 @@ define ["./dom", "./events", "./messages", "./builder", "./ajax",
@showPopup()
return
- @fieldError (dom.escapeHTML reply.error)
+ @fieldError (_.escape reply.error)
@hidePopup()
return
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/341bd0a7/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
index 3eb33c1..6172c07 100644
--- a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
+++ b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
@@ -844,9 +844,6 @@ define ["underscore", "./utils", "./events"
_.extend exports,
wrap: wrapElement
- # Escape's HTML markup in the string.
- escapeHTML: _.escape
-
triggerReflow: triggerReflow
ajaxRequest: ajaxRequest