History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GRAILS-1483
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Graeme Rocher
Reporter: Holger Klawitter
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Grails

isList constraint does not properly expand non ascii characters

Created: 14/Aug/07 08:09 AM   Updated: 14/Aug/07 08:14 AM
Component/s: TagLib
Affects Version/s: 0.5.6
Fix Version/s: None

Time Tracking:
Not Specified

Environment: jdk 1.5.0.12, Linux/ii386


 Description  « Hide
the domain constraint (in class Buch):
type(inList:["Roman","Märchen"])
expands via "grails generate-views" to
<g:select name='type' from='${buch.constraints.type.inList.collect{it.encodeAsHTML()}}' value="${buch.type?.encodeAsHTML()}"></g:select>
which is being rendered as:
...
<option value="Roman" >Roman</option>
<option value="Märchen" >M&auml;rchen</option>

The "amp;" is not correct here. Just leaving out the encodeHTML() however creates
<option value="Märchen" >Märchen</option>
which is correct as value is now unescaped.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Holger Klawitter - 14/Aug/07 08:11 AM
I meant INcorrect in the last sentence...

Holger Klawitter - 14/Aug/07 08:14 AM
I'm sorry again. The $%$%@ JIRA editor unescaped a lot of entityrefs. I try again:

First Result is
<option value="M&auml;rchen">M&amp;auml;rchen</option>

The one without encode HTML is
<option value="Märchen">M&auml;rchen</option>