W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2004

[whatwg] Web Forms 2.0 comments - [ID] repetition index replacement

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 15 Jun 2004 11:33:45 +0200
Message-ID: <40CEC279.1080106@inkedblade.net>
Ian Hickson wrote:
>
> Ouch, good point, a template might well include user-entered data that
> might match that string. For that matter a script might contain [foo]
> which happens to be the ID of the template.
> 
> I'm somewhat reluctant to just say "only do these attributes" since
> there's bound to be use cases where you need to do it that haven't been
> covered. Like, in fact, value (there are some interesting use cases that
> involve only using it in value, instead of name, and some cases where
> you would want to affect the scripts).
> 
> Any other ideas for solving this?

Change the replacement punctuation from "[id]" to "-.id.-" or ":-id-:" or
something like that. This has two advantages:

   a) The combination of that very unusual punctuation sequence (both
      opening and closing) /and/ an exact match of the template ID is
      going to be so rare as to be practically ignorable.
   b) ID and NAME attributes using the replacement mechanism can still
      be valid.

~fantasai

-- 
http://fantasai.inkedblade.net/contact
Received on Tuesday, 15 June 2004 02:33:45 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:34 UTC