[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Converting a string to valid XHTML id?
From: |
Lennart Borgman |
Subject: |
Re: Converting a string to valid XHTML id? |
Date: |
Thu, 2 Dec 2010 00:12:31 +0100 |
On Wed, Dec 1, 2010 at 11:32 PM, Davis Herring <address@hidden> wrote:
>> That sounds tempting but is wrong :-/ Percent-encoding doesn't produce
>> valid ID values. From the html 4 specs:
>>
>> 6.2 SGML basic types
>>
>> ....
>>
>> ID and NAME tokens must begin with a letter ([A-Za-z]) and may be
>> followed by any number of letters, digits ([0-9]), hyphens ("-"),
>> underscores ("_"), colons (":"), and periods (".").
>
> If you're referring to the leading letter, you're right -- I forgot about
> it. Easy enough to fix: also use Lennart's "ANON-" prefix when the string
> begins with a non-letter or with the string "ANON-".
>
> Or is there something more fundamental that I'm missing?
Yes, % is not allowed. And the names should be unique.
- Re: Converting a string to valid XHTML id?, Lennart Borgman, 2010/12/01
- Re: Converting a string to valid XHTML id?, Davis Herring, 2010/12/01
- Re: Converting a string to valid XHTML id?, rm, 2010/12/01
- Re: Converting a string to valid XHTML id?, Davis Herring, 2010/12/01
- Re: Converting a string to valid XHTML id?,
Lennart Borgman <=
- Re: Converting a string to valid XHTML id?, Davis Herring, 2010/12/01
- Re: Converting a string to valid XHTML id?, Lennart Borgman, 2010/12/01
- Re: Converting a string to valid XHTML id?, Davis Herring, 2010/12/01
- Re: Converting a string to valid XHTML id?, Lennart Borgman, 2010/12/01
- Re: Converting a string to valid XHTML id?, Davis Herring, 2010/12/01
- Re: Converting a string to valid XHTML id?, Lennart Borgman, 2010/12/01
Re: Converting a string to valid XHTML id?, Stefan Monnier, 2010/12/01