[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?


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]