Oh yes! And it works without any problem. You can even write: ${x?url('UTF-8')}.

I am just trying to figure out if in Magnolia I can set that property on the 
FreemarkerConfig.

Bye, Bert


> -----Original Message-----
> From: [email protected] [mailto:user-list-
> [email protected]] On Behalf Of Fabrizio Giustina
> Sent: vrijdag 27 augustus 2010 16:02
> To: Magnolia User-List
> Subject: Re: [magnolia-user] new freemarker configuration setting
> 
> 
> Hi,
> you can easily set the variable directly in the freemarker template,
> with:
> [#setting url_escaping_charset="UTF-8"]
> 
> fabrizio
> 
> 
> 
> On Fri, Aug 27, 2010 at 3:55 PM, Bert Leunis <[email protected]> wrote:
> > Hi Christian,
> >
> >
> >
> > Yes, I see that in FreemarkerHelper the FreemarkerConfig is set, but
> I see
> > no way to change that config without recompiling the
> FreemarkerHelper. My
> > suggestion would be that Magnolia adds this to the code. Unless of
> course I
> > can set that property using configuration in the repository, but I
> don’t
> > know how. You already set the default encoding:
> >
> >
> >
> > cfg.setDefaultEncoding("UTF8");
> >
> >
> >
> > Setting the url_escaping_charset is a useful addition to the
> Freemarker
> > config I think. I can supply a patch if you want.
> >
> >
> >
> > cfg.setURLEscapingCharset("UTF8");
> >
> >
> >
> > Regards, Bert
> >
> >
> >
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Christian
> Ringele
> > Sent: vrijdag 27 augustus 2010 15:22
> > To: Magnolia User-List
> > Subject: Re: [magnolia-user] new freemarker configuration setting
> >
> >
> >
> > Hi Bert,
> >
> >
> >
> > Probably this is the class you want to look at:
> >
> > FreemarkerHelper
> >
> >
> >
> > There it sets the freemarker configuration (FreemarkerConfig).
> >
> >
> >
> > Best regards,
> >
> > Christian
> >
> >
> >
> > On Aug 27, 2010, at 9:09 AM, Bert Leunis wrote:
> >
> > Hi all,
> >
> >
> >
> > Since Freemarker 2.3.1 a new built-in exists: ?url for url escaping:
> >
> see http://freemarker.sourceforge.net/docs/ref_builtins_string.html#ref
> _builtin_url.
> >
> > For this built-in to work, a configuration variable has to be set:
> > url_escaping_charset. I took a look at the
> > info.magnolia.freemarker.FreemarkerHelper class where the Freemarker
> config
> > is set for Magnolia. I can’t find a way to set this variable myself,
> or is
> > there? Otherwise I think it can be a useful addition to the
> freemarker
> > config for Magnolia.
> >
> >
> >
> > Best regards, Bert
> >
> >
> >
> >
> >
> > ________________________________
> >
> > ----------------------------------------------------------------
> > For list details see
> > http://www.magnolia-cms.com/home/community/mailing-lists.html
> > To unsubscribe, E-mail to: <[email protected]>
> > ----------------------------------------------------------------
> >
> >
> >
> > Best regards,
> >
> > Christian Ringele
> > Magnolia International Ltd.
> >
> >
> >
> > You should join us at Magnolia Conference 2010:
> > http://www.magnolia-cms.com/conference
> >
> > Magnolia®  - Simple Open Source Content Management
> >
> >
> >
> >
> >
> > ________________________________
> >
> > ----------------------------------------------------------------
> > For list details see
> > http://www.magnolia-cms.com/home/community/mailing-lists.html
> > To unsubscribe, E-mail to: <[email protected]>
> > ----------------------------------------------------------------
> >
> > ________________________________
> > ----------------------------------------------------------------
> > For list details see
> > http://www.magnolia-cms.com/home/community/mailing-lists.html
> > To unsubscribe, E-mail to: <[email protected]>
> > ----------------------------------------------------------------
> >
> 
> 
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to