[Catalyst] I18N with quotation marks

Bill Moseley moseley at hank.org
Wed Jul 1 17:55:40 GMT 2009


On Wed, Jul 1, 2009 at 10:22 AM, Ton Voon <ton.voon at opsera.com> wrote:

> Hi!
>
> I wanted to find out how other people are handling this problem.
>
> I am localising our app, which consists of strings in html and in dynamic
> javascript snippets. However, if the translated value contains quotations
> (such as: s'il vous plait), then it could break the HTML:
>
> <select value=3D'[% c.loc("Please select one") %]'>


I would think the correct approach would be a filter:

     <select value=3D'[% c.loc("Please select one") | html %]'>

but the default html filter only escapes double quotes.




-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090701/5c595=
4a3/attachment.htm


More information about the Catalyst mailing list