You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by am...@apache.org on 2015/11/25 08:02:10 UTC
struts git commit: WW-4571 Drops deprecated escape attribute in
property tag
Repository: struts
Updated Branches:
refs/heads/master c3ec2c339 -> ed8dc577b
WW-4571 Drops deprecated escape attribute in property tag
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/ed8dc577
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/ed8dc577
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/ed8dc577
Branch: refs/heads/master
Commit: ed8dc577b7e6c4fa02cba853c62f82b2e3b0ed15
Parents: c3ec2c3
Author: Aleksandr Mashchenko <am...@apache.org>
Authored: Wed Nov 25 09:01:20 2015 +0200
Committer: Aleksandr Mashchenko <am...@apache.org>
Committed: Wed Nov 25 09:01:20 2015 +0200
----------------------------------------------------------------------
.../main/java/org/apache/struts2/components/Property.java | 10 ++++------
.../java/org/apache/struts2/views/jsp/PropertyTag.java | 8 ++------
core/src/site/resources/tags/property.html | 8 --------
.../org/apache/struts2/views/jsp/PropertyTagTest.java | 6 +++---
4 files changed, 9 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/ed8dc577/core/src/main/java/org/apache/struts2/components/Property.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/components/Property.java b/core/src/main/java/org/apache/struts2/components/Property.java
index 6baba58..9d2c2b6 100644
--- a/core/src/main/java/org/apache/struts2/components/Property.java
+++ b/core/src/main/java/org/apache/struts2/components/Property.java
@@ -43,7 +43,10 @@ import java.io.Writer;
*
* <ul>
* <li>default (String) - The default value to be used if <u>value</u> attribute is null</li>
- * <li>escape (Boolean) - Escape HTML. Default to true</li>
+ * <li>escapeCsv (Boolean) - Escape CSV. Defaults to false</li>
+ * <li>escapeHtml (Boolean) - Escape HTML. Defaults to true</li>
+ * <li>escapeJavaScript (Boolean) - Escape JavaScript. Defaults to false</li>
+ * <li>escapeXml (Boolean) - Escape XML. Defaults to false</li>
* <li>value (Object) - value to be displayed</li>
* </ul>
*
@@ -102,11 +105,6 @@ public class Property extends Component {
this.defaultValue = defaultValue;
}
- @StrutsTagAttribute(description="Deprecated. Use 'escapeHtml'. Whether to escape HTML", type="Boolean", defaultValue="true")
- public void setEscape(boolean escape) {
- this.escapeHtml = escape;
- }
-
@StrutsTagAttribute(description="Whether to escape HTML", type="Boolean", defaultValue="true")
public void setEscapeHtml(boolean escape) {
this.escapeHtml = escape;
http://git-wip-us.apache.org/repos/asf/struts/blob/ed8dc577/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java b/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java
index 6176e49..560bc7b 100644
--- a/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java
+++ b/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java
@@ -53,8 +53,8 @@ public class PropertyTag extends ComponentTagSupport {
Property tag = (Property) component;
tag.setDefault(defaultValue);
- tag.setValue(value);
- tag.setEscape(escapeHtml);
+ tag.setValue(value);
+ tag.setEscapeHtml(escapeHtml);
tag.setEscapeJavaScript(escapeJavaScript);
tag.setEscapeXml(escapeXml);
tag.setEscapeCsv(escapeCsv);
@@ -64,10 +64,6 @@ public class PropertyTag extends ComponentTagSupport {
this.defaultValue = defaultValue;
}
- public void setEscape(boolean escape) {
- this.escapeHtml = escape;
- }
-
public void setEscapeHtml(boolean escapeHtml) {
this.escapeHtml = escapeHtml;
}
http://git-wip-us.apache.org/repos/asf/struts/blob/ed8dc577/core/src/site/resources/tags/property.html
----------------------------------------------------------------------
diff --git a/core/src/site/resources/tags/property.html b/core/src/site/resources/tags/property.html
index 033984d..db893a0 100644
--- a/core/src/site/resources/tags/property.html
+++ b/core/src/site/resources/tags/property.html
@@ -42,14 +42,6 @@ Please do not edit it directly.
<td align="left" valign="top">The default value to be used if <u>value</u> attribute is null</td>
</tr>
<tr>
- <td align="left" valign="top">escape</td>
- <td align="left" valign="top">false</td>
- <td align="left" valign="top">true</td>
- <td align="left" valign="top">false</td>
- <td align="left" valign="top">Boolean</td>
- <td align="left" valign="top">Deprecated. Use 'escapeHtml'. Whether to escape HTML</td>
- </tr>
- <tr>
<td align="left" valign="top">escapeCsv</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">false</td>
http://git-wip-us.apache.org/repos/asf/struts/blob/ed8dc577/core/src/test/java/org/apache/struts2/views/jsp/PropertyTagTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/PropertyTagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/PropertyTagTest.java
index a2b77ba..89c7925 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/PropertyTagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/PropertyTagTest.java
@@ -211,7 +211,7 @@ public class PropertyTagTest extends StrutsInternalTestCase {
// test
{PropertyTag tag = new PropertyTag();
- tag.setEscape(false);
+ tag.setEscapeHtml(false);
tag.setEscapeJavaScript(true);
tag.setPageContext(pageContext);
tag.setValue("%{formatTitle()}");
@@ -241,7 +241,7 @@ public class PropertyTagTest extends StrutsInternalTestCase {
// test
{PropertyTag tag = new PropertyTag();
- tag.setEscape(false);
+ tag.setEscapeHtml(false);
tag.setEscapeXml(true);
tag.setPageContext(pageContext);
tag.setValue("%{formatTitle()}");
@@ -271,7 +271,7 @@ public class PropertyTagTest extends StrutsInternalTestCase {
// test
{PropertyTag tag = new PropertyTag();
- tag.setEscape(false);
+ tag.setEscapeHtml(false);
tag.setEscapeCsv(true);
tag.setPageContext(pageContext);
tag.setValue("%{formatTitle()}");