On May 22, 2007, at 9:02 AM, iain duncan wrote:

>
> On Mon, 2007-07-05 at 18:18 +0000, Ian Charnas wrote:
>> Hyphens and Underscores are definitely included in the specs, and I
>> haven't run across a good argument that would urge us not to use
>> them.  Colons and periods however, *are* problematic because they are
>> also special characters in CSS selectors, as I believe Jorge was
>> pointing out.  The period denotes a css class, and the colon  
>> denotes a
>> pseudo-class or a pseudo-element.  I haven't seen any webmasters  
>> using
>> periods and colons as part of an id... which gives us an interesting
>> option.  Currently, underscores are used to form the ids of compound
>> widgets.  If we switched that to periods (or colons), we would  
>> open up
>> the door for people to use underscores in ids, without losing  
>> anything
>> in the process.  This would however, potentially break some people's
>> css, if they had used the existing underscore-laden id fields as css
>> selectors in their css.
>
> +1 on replacing underscore as a special char with something else.  
> Anyone
> coming from a c/c++ background like myself is probably used to using
> underscores all over the place.

Unless I'm missing something, I think there's no need to ban any w3c  
compliant character from widget's ids. Although underscores are used  
to build an id for nested widgets (solely to help out avoiding id  
clashes), this id is not parsed at any later time so there's no  
chance for confusion.  The problem is only with form field *names*  
since those are decoded by FE into a nested structure when forms are  
submitted.

So I think there's no need to change the current (post [3018]) state  
of affairs since now any compliant character can be used as a widget  
id, if the derived form field name would cause problems (ie: contains  
hypens or dots) an exception will be raised and the name can be  
overriden with the "name" kw.

Alberto

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to