0

I'm trying to use internationalization with grails

everything works fine on browser, Greek characters display properly, but when I open the page source of the browser to check the generated html code, the Greek characters display like this:

<meta name="keywords" content="&Epsilon;&nu;&omicron;&iota;&kappa;&iota;&alpha;&zeta;ό&mu;&epsilon;&nu;&alpha; &delta;&omega;&mu;ά&tau;&iota;&alpha;"/>

The issue above arises only when I use the the message function , i.e.

content="${message(code:'keywords' )}"

When I use the tag message,

<pre>
 <g:message code="test" />
</pre>

Greek characters are shown correctly on the source code of the browser.

Any help? I found this page: http://htmlhelp.com/reference/html40/entities/symbols.html for Greek symbols and html entities

I suppose Google's spiders wont be happy with the Greek version of the site

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
user711189
  • 4,383
  • 4
  • 30
  • 48

1 Answers1

0

It is probably the setting for grails.views.default.codec in your Config.groovy. If it is html then everything in a Groovy block ${ } will be encoded with HTML entities, but the <g:message/> tag won't be, as it doesn't apply the encodeAsHTML() call.

You can override this setting with in page settings so that the parts of your gsps which need escaping are still encoded.

Community
  • 1
  • 1
schmolly159
  • 3,881
  • 17
  • 26