Re: [widgets] Trimming attribute values, a bad idea?

Hi Jonas,
On Wed, Dec 3, 2008 at 3:04 AM, Jonas Sicking <jonas@sicking.cc> wrote:
> On 12/2/08, Marcos Caceres <marcosscaceres@gmail.com> wrote:
>>
>> Got a question... I've relaxed keyword attributes to be allowed to
>> have leading and trailing whitespace. Now, widget user agents are
>> required to trim whitespace prior to validation/processing. Widget
>> user agents must only perform literal comparisons with trimmed values,
>> and must not perform case insensitive comparisons.
>>
>> So, for instance, <access network="     false    "> is ok.
>>
>> Does anyone see any problem with this? Should I revert back to being
>> strict and having UA do comparisons without trimming?
>
> Implementation-wise it's much simpler and performant to do a case
> sensitive strict check that doesn't trim whitespace. But it's not a
> big deal really.
>
> However you do need to strictly define which characters are whitespace
> (there are a couple in the 0x2000 range iirc). And you probably don't
> want any values that can contain non-ASCII characters to be case
> insensitively matched.

We share HTML5's white space definition. All comparisons will be done
case sensitively.

Kind regards,
Marcos

-- 
Marcos Caceres
http://datadriven.com.au

Received on Wednesday, 3 December 2008 20:08:48 UTC