#comment-1.01 span.votes a . in the id name gives it problems according to the specs there is nothing wrong with having a dot in id or class names im using 1.5, has this been fixed recently? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Frederic Gaus
2007-Oct-09 12:27 UTC
Re: problem with $$ function dot in id name makes it fail
Thierry schrieb:> #comment-1.01 span.votes > > a . in the id name gives it problems > according to the specs there is nothing wrong with having a dot in id > or class names > > im using 1.5, has this been fixed recently?This could be difficult to fix. Are you really sure, that this is valid? Just check out this: <div id="class.name" /> <div id="class" class="name" /> Strange ... Greetings Frederic -- Frederic Gaus pgp-key: 93E6903C fingerprint: 0C55 4517 CC1E 5F7F 9059 3535 AB54 D8E8 93E6 903C --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Tobie Langel
2007-Oct-09 12:28 UTC
Re: problem with $$ function dot in id name makes it fail
Hi, No, this hasn''t been fixed yet, but there''s an open ticket for it: dev.rubyonrails.org/ticket/9739 Regards, Tobie On Oct 9, 1:56 pm, Thierry <thierryschellenb...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> #comment-1.01 span.votes > > a . in the id name gives it problems > according to the specs there is nothing wrong with having a dot in id > or class names > > im using 1.5, has this been fixed recently?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Fabian Lange
2007-Oct-09 12:46 UTC
Re: problem with $$ function dot in id name makes it fail
Hi, the spec says: In CSS2, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [A-Za-z0-9] and ISO 10646 characters 161 and higher, plus the hyphen (-); they cannot start with a hyphen or a digit. They can also contain escaped characters and any ISO 10646 character as a numeric code (see next item). For instance, the identifier "B&W?" may be written as "B\&W\?" or "B\26 W\3F". w3.org/TR/REC-CSS2/syndata.html#value-def-identifier so this should be the base. Interestingly enough, an underscore is commonly used, but not covered by the css spec. The underscore comes into the game by html spec: 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 ("."). w3.org/TR/REC-html40/types.html#type-name So the issue arises from the css spec (which covers the css selectors) being more restrictive than the html spec, which allows periods for ids (class is cdata, meaning almost everything is allowed) So I guess the question is: which relvante Implementations in Browsers allow which characters in ID and CLASS attributes .:Fabian PS: I guess the period is handled differently because it acts as keytoken for classnames, similar to the hash which is the keytoken for ids -----Original Message----- From: grbounce-_Pkz0AUAAAB9-VKt0-RY8LHUELm10l3Y=fabian.lange=web.de@googlegroups.com [mailto:grbounce-_Pkz0AUAAAB9-VKt0-RY8LHUELm10l3Y=fabian.lange=web.de-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Thierry Sent: Dienstag, 9. Oktober 2007 13:56 To: Ruby on Rails: Spinoffs Subject: [Rails-spinoffs] problem with $$ function dot in id name makes it fail #comment-1.01 span.votes a . in the id name gives it problems according to the specs there is nothing wrong with having a dot in id or class names im using 1.5, has this been fixed recently? _______________________________________________________________________ Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate kostenlos testen. pc-sicherheit.web.de/startseite/?mc=022220 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Help on Open-SSl implementation with Apache + windows. rails-ssl.blogspot.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I think using such tokens such as a period or hash symbol in the selector is a wretched idea. Can you think of a regex to parse out the distinct class names from the period delimited names. First thought was sure, anything that isn''t preceded by a space, but what about this notation, "div.ATeam" I am referencing a div that has the class name ATeam, so now we have to create a whitelist of HTML elements that wouldn''t be considered in the selector "div.A.Team" Oh but wait now we have tripped on our feet, now we have what could be considered in our white list but it is now a piece of the period delimited class name, the headache ensues when class names further collide with HTML elements "address.address". Underscore for the win. Cheers, Matt On Oct 9, 11:08 am, "raghubetter" <raghubet...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Help on Open-SSl implementation with Apache + windows.http://rails-ssl.blogspot.com--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
problem with $$ function dot in id name makes it fail that pretty much sums it up --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I see the problem, think it would be best for me to change the dot into something else :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Ken Snyder
2007-Oct-09 22:48 UTC
Re: problem with $$ function dot in id name makes it fail
On 10/9/07, Thierry <thierryschellenbach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I see the problem, think it would be best for me to change the dot > into something else :) >You can always use an explicit id attribute: $$(''*[id="id.with.periods"]''); Entering ids like "#id.with.periods" in the CSS SelectORacle also produces unexpected results penguin.theopalgroup.com/cgi-bin/css3explainer/selectoracle.py. I''m not sure if you can do it in CSS. Maybe there is an escape character or a quoting method? - Ken Snyder --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Tobie Langel
2007-Oct-10 05:56 UTC
Re: problem with $$ function dot in id name makes it fail
In CSS "." and ":" should be escaped using back-slashes like so: #person\.name.employee { /* css rules */ } // id: #person.name, class: employee a.links\:external:hover { /* css rules */ } /( tag: a, class: links:external, pseudo-class: hover The readability''s close to null IMHO, hence the very low adoption rate. I''ve never ever used either characters in a class or id name myself but I understand who they could be useful for namespacing purposes. I don''t know what the rest of the core team thinks about it. I''m personally not hostile to supporting it as long as it doesn''t wreck the performance of $$ and other Selector-related methods. Regards, Tobie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Richard Quadling
2007-Oct-10 09:54 UTC
Re: problem with $$ function dot in id name makes it fail
On 10/10/2007, Tobie Langel <tobie.langel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > In CSS "." and ":" should be escaped using back-slashes like so: > > #person\.name.employee { /* css rules */ } // id: #person.name, class: > employee > > a.links\:external:hover { /* css rules */ } /( tag: a, class: > links:external, pseudo-class: hover > > The readability''s close to null IMHO, hence the very low adoption > rate. > > I''ve never ever used either characters in a class or id name myself > but I understand who they could be useful for namespacing purposes. > > I don''t know what the rest of the core team thinks about it. I''m > personally not hostile to supporting it as long as it doesn''t wreck > the performance of $$ and other Selector-related methods. > > Regards, > > TobieIf prototype supports the correct way of working, then what will need to be broken to support an incorrect way of working? If there is no escaping supplied, you would be guessing when to escape it. You could use $$(''element[id=id.with.dots]'') -- ----- Richard Quadling Zend Certified Engineer : zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Markus Hammer
2007-Oct-11 07:47 UTC
Re: problem with $$ function dot in id name makes it fail
Please shoot me. Turn on moderation for this list or something, this aint javascript/html/css beginners. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Markus Hammer
2007-Oct-11 07:58 UTC
Re: problem with $$ function dot in id name makes it fail
posted under the wrong thread ... i don''t understand why the CSS and HTML spec consider escaped dots a valid content for html ID''s. i''d rather say its a problem of HTML spec not supporting custom attributes for tags, which leads to Ajax developers having to load up the code with "_" delimited id tags for Data References if they want their pages to validate. -- On 11 Okt., 09:47, Markus Hammer <yaya...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Please shoot me. Turn on moderation for this list or something, this > aint javascript/html/css beginners.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---