commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@Elsag-Solutions.com>
Subject RE: [i18n] [Fwd: Re: Commons - I18N - adding timezones and filtering]
Date Mon, 07 Aug 2006 06:56:11 GMT
Hi Armin,

although I know it is tedious to get another pointer, but patches should go to JIRA: http://issues.apache.org/jira/browse/SANDBOX,
that way they don't het lost. Note, that you have to create an account for yourself, before
you're able to create an issue for SANDBOX.

- Jörg

Armin Häberling wrote on Saturday, August 05, 2006 3:39 PM:

> Hi
> 
> I've implemented two little extensions for the Commons-i18n project
> (See the mail below and the attached patch).
> I'd like to see your comments on this.
> 
> Regards
> 
> Armin Häberling
> 
> 
> 
> -------- Original Message --------
> Subject: Re: Commons - I18N - adding timezones and filtering
> Date: Sat, 5 Aug 2006 14:49:56 +0200
> From: Oliver Zeigermann <oliver.zeigermann@gmail.com>
> To: Armin Häberling <arminha@student.ethz.ch>
> CC: dflorey@apache.org, "Ralf Hauser" <hauser@privasphere.com>
> References: <44D3696C.6010503@student.ethz.ch>
> 
> Hi Armin!
> 
> Thanks a lot for your patch. Would you mind resinding your complete
> patch to the commons developer mailing list? This way everyone can
> have a look at it and see if it fits into commons i18n.
> 
> Thanks a lot in advance and cheers
> 
> Oliver
> 
> 2006/8/4, Armin Häberling <arminha@student.ethz.ch>:
>> Hi
>> 
>> I've implemented two little extensions for the commons I18N project:
>> 
>> 1) Timezone independence:
>> Currently dates as message arguments are only displayed in the
>> default time zone returned by the method TimeZone.getDefault().
>> I extended the MessageManager.getText() so that one can also choose
>> in which timezone Date arguments can be displayed.
>> 
>> In the current implementation the message template must contain a
>> date or time format so that the message is formated with the right
>> timezone. That means the template "it's now {0}" will not work,
>> whereas "it's now {o,time} will work. 
>> 
>> 2) filtering of message arguments:
>> You may want to include String in message arguments that are
>> untrusted (i.e. user input). But when you display such a message on
>> a html site it may contain a javascript attack or other nasty
>> things. Otherwise if you want to store the message in an sql table
>> there are also attacks possible. Cause of this the arguments should
>> be filtered depending on later use of the message. For this I
>> created a new Filter Interface and extended the LocalizedBundle so
>> that you can attach a specific filter which filters the message
>> arguments before formating it. I also did two simple implementations
>> of specific filters. 
>> 
>> I've attached a little patch with my changes. Any comments are
>> welcome. 
>> 
>> 
>> Regards
>> 
>> Armin Häberling

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message