mirror of
https://github.com/apache/struts.git
synced 2026-08-06 07:06:58 +00:00
WW-4571 Drops deprecated escape attribute in property tag
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -41,14 +41,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<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>
|
||||
|
||||
@@ -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()}");
|
||||
|
||||
Reference in New Issue
Block a user