Author: mgrigorov
Date: Fri Jan 14 19:00:42 2011
New Revision: 1059113

URL: http://svn.apache.org/viewvc?rev=1059113&view=rev
Log:
WICKET-3333 Links with multiple parameters are wrongly generated
WICKET-2829 Tag attributes values are not escaped properly during writeOutput

By default do not escape the value of TextField. The value is already escaped 
by WICKET-2829.
If the user wants to see the non-escaped value in the text field then she needs 
to explicitly call .setEscapeModelStrings(true).

Modified:
    
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/TextField.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/TextField.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/TextField.java?rev=1059113&r1=1059112&r2=1059113&view=diff
==============================================================================
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/TextField.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/TextField.java
 Fri Jan 14 19:00:42 2011
@@ -36,7 +36,7 @@ public class TextField<T> extends Abstra
         */
        public TextField(final String id)
        {
-               super(id);
+               this(id, null, null);
        }
 
        /**
@@ -47,8 +47,7 @@ public class TextField<T> extends Abstra
         */
        public TextField(final String id, final Class<T> type)
        {
-               super(id);
-               setType(type);
+               this(id, null, type);
        }
 
        /**
@@ -58,7 +57,7 @@ public class TextField<T> extends Abstra
         */
        public TextField(final String id, final IModel<T> model)
        {
-               super(id, model);
+               this(id, model, null);
        }
 
        /**
@@ -74,6 +73,9 @@ public class TextField<T> extends Abstra
        {
                super(id, model);
                setType(type);
+
+               // don't double encode the value. it is encoded by 
ComponentTag.writeOutput()
+               setEscapeModelStrings(false);
        }
 
        /**


Reply via email to