W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2008

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

From: Marcos Caceres <marcosscaceres@gmail.com>
Date: Wed, 3 Dec 2008 20:08:01 +0000
Message-ID: <b21a10670812031208k7ed029edi82528deec6c3183f@mail.gmail.com>
To: public-webapps <public-webapps@w3.org>

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 Caceres
Received on Wednesday, 3 December 2008 20:08:48 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:13 UTC