myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kito Mann <kito.m...@virtua.com>
Subject Re: is i18n messages suppose to be html escaped?
Date Wed, 19 Oct 2011 05:11:38 GMT
Ted,

The strings will only be escaped if the component you're using escapes the
text. If you're just embedding the expression in the page, it's not going to
be escaped, but you can use <h:outputText> -- this allows you to control
whether or not you want the text escaped.
---
Kito D. Mann | twitter: kito99 | Author, JSF in Action
Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter:
jsfcentral
+1 203-404-4848 x3

* Listen to the latest headlines in the JSF and Java EE newscast:
http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+Newscast
* Keep up with the aftermath of the Oracle/Sun merger:
http://www.mergerspeak.com



On Tue, Oct 18, 2011 at 11:36 PM, Ted <r6squeegee@gmail.com> wrote:

> I'm using string tables and to i18n some messages using jsf and I've got
> some unexpected behavior
>
> if I have a string table
>
> string1=<bold>asdf</bold>
> string2=my "cow" is brown
>
> if I then go on to a jsf page and do
>
> #{msg.string1}
> #{msg.string2}
>
> the result I get is
>
> &lt;bold&gt;asdf&lt;/bold&gt;
> my "cow" is brown
>
> My expectation is that the quote should have been converted to &quot;
> shouldn't it? (either that or at least the <'s should not have been
> escaped...)
>
> anyone know anything about this?
> --
> Ted.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message