Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.1.2
-
Fix Version/s: None
-
Component/s: Scaffolding
-
Labels:None
Description
Scaffolded edit page gives:
<g:textField name="name" value="$
{fieldValue(bean: beanInstance, field: 'name')}" />
fieldValue encodes the field value as XML, translating < into < etc.
This is correct if you put the field value as text on your web page.
However, in the above case, it is wrong. The user will actually see the value with < in it, and if the user saves the domain class, the property will change to <. If the user does this again, it will change to <. Etc.
A workaround is to enter:
<g:textField name="name" value="$
{beanInstance.name}" />
I'm not sure if the workaround is perfect, but it worked for me. If it is perfect, it should be in the standard scaffold templates too.
In the above message, unfortunately some encoding happened as well.
You should read on the 3rd line:
translating < into < etc.
On the 5th line
The user will actually see the value with < in it, ... the property will change to < ... it will change to &<