[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Converting a string to valid XHTML id?
From: |
Davis Herring |
Subject: |
Re: Converting a string to valid XHTML id? |
Date: |
Wed, 1 Dec 2010 14:32:30 -0800 (PST) |
User-agent: |
SquirrelMail/1.4.8-5.el5_4.10.lanl3 |
> 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?
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
- 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 <=
- 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?, 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