Hi Grég, Approach 1 should at least be done. Nr 2 takes changing the config, so a the versionhandler must be altered too. A bit more work. Same goes for 3, which in the end is the very best option. Whenever I find time (bit busy here!) I'll send in a patch.
Au revoir a Basle, Bert > -----Original Message----- > From: [email protected] [mailto:user-list- > [email protected]] On Behalf Of Grégory Joseph > Sent: maandag 30 augustus 2010 13:17 > To: Magnolia User-List > Subject: Re: [magnolia-user] new freemarker configuration setting > > > Hi Bert, > > No, you currently can't configure this via the configuration tree. > > What's a "good default" for url encoding ? > > A jira report + patch will certainly speed things up. > > As far as I can tell, there are basically 3 approaches: 1) we simply > add cfg.setURLEscapingCharset("UTF8"); next to > cfg.setDefaultEncoding("UTF8"); > 2) we make both of these configurable via admincentral > 3) we make ALL config properties configurable via admincentral by using > freemarker.core.Configurable#setSetting > > -g > > On Aug 27, 2010, at 15:55, Bert Leunis 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:user-list- > [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_bui > ltin_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]> ----------------------------------------------------------------
