craigmcc 2002/06/22 14:54:56 Modified: doc/userGuide struts-html.xml src/share/org/apache/struts/taglib/html OptionsCollectionTag.java Log: Add "filter" attribute on <html:optionscollection> tag. PR: Bugzilla #10106 Submitted by: Ian Tomey <ian.tomey at lombardrisk.com> Revision Changes Path 1.10 +11 -0 jakarta-struts/doc/userGuide/struts-html.xml Index: struts-html.xml =================================================================== RCS file: /home/cvs/jakarta-struts/doc/userGuide/struts-html.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- struts-html.xml 22 Apr 2002 20:59:19 -0000 1.9 +++ struts-html.xml 22 Jun 2002 21:54:56 -0000 1.10 @@ -4086,6 +4086,17 @@ </info> <attribute> + <name>filter</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <info> + Set to <code>false</code> if you do NOT want the option labels + filtered for sensitive characters in HTML. By default, such + values are filtered. + </info> + </attribute> + + <attribute> <name>label</name> <required>false</required> <rtexprvalue>true</rtexprvalue> 1.4 +21 -2 jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsCollectionTag.java Index: OptionsCollectionTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsCollectionTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- OptionsCollectionTag.java 13 May 2002 02:03:33 -0000 1.3 +++ OptionsCollectionTag.java 22 Jun 2002 21:54:56 -0000 1.4 @@ -109,6 +109,20 @@ /** + * Should the label values be filtered for HTML sensitive characters? + */ + protected boolean filter = true; + + public boolean getFilter() { + return filter; + } + + public void setFilter(boolean filter) { + this.filter = filter; + } + + + /** * The name of the bean property containing the label. */ protected String label = "label"; @@ -307,6 +321,7 @@ */ public void release() { super.release(); + filter = true; label = "label"; name = Constants.BEAN_KEY; property = null; @@ -347,7 +362,11 @@ sb.append("\""); } sb.append(">"); - sb.append(ResponseUtils.filter(label)); + if (filter) { + sb.append(ResponseUtils.filter(label)); + } else { + sb.append(label); + } sb.append("</option>\r\n"); }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>