[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting a string to valid XHTML id?

From: Kevin Rodgers
Subject: Re: Converting a string to valid XHTML id?
Date: Wed, 01 Dec 2010 19:37:31 -0700
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv: Gecko/20101027 Thunderbird/3.1.6

On 12/1/10 12:51 PM, Lennart Borgman wrote:
On Wed, Dec 1, 2010 at 4:51 PM, Stefan Monnier<address@hidden>  wrote:
collapsing two different strings to the same ID, resulting in
invalid html.

I have no idea what those ids are for, but wouldn't a cryptographic hash
work as well?

It is just the value of the id attribute, for example like this:

    <span id="...">

Is the point of your function to create a syntactically valid XHTML id from a
string that is assumed to be unique within the context of the current document,
or is it to generate a syntactically valid, unique XHTML id every time it is
called (even when called multiple times with the same string)?

Kevin Rodgers
Denver, Colorado, USA

reply via email to

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