Loading ...
Sorry, an error occurred while loading the content.

ID's starting with numeric character not flagged as invalid

Expand Messages
  • David Rueter
    I noticed that JSLint does not detect a problem with HTML ID attributes that begin with a numeral. I ran into a problem the other day where YUI3 was doing
    Message 1 of 3 , Jan 28, 2010
    • 0 Attachment
      I noticed that JSLint does not detect a problem with HTML ID attributes that
      begin with a numeral.



      I ran into a problem the other day where YUI3 was doing something really
      strange. It turned out that YUI3 gets confused when the leading character
      of a node ID begins with a numeral.



      Of course the HTML spec says that the first character of an ID must be a
      letter A-Z. it was my fault for not remembering this when I chose to use a
      GUID as the ID. But this was especially confusing since it would fail
      randomly (i.e. when the GUID began with a letter A-F all was fine, but a 0-9
      would fail).



      Shouldn't JSLint throw a warning if the HTML ID begins with a numeral?



      David Rueter

      drueter@...







      [Non-text portions of this message have been removed]
    • Douglas Crockford
      ... Please try it now.
      Message 2 of 3 , Jan 28, 2010
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "David Rueter" <drueter@...> wrote:
        >
        > I noticed that JSLint does not detect a problem with HTML ID attributes that
        > begin with a numeral.
        >
        >
        >
        > I ran into a problem the other day where YUI3 was doing something really
        > strange. It turned out that YUI3 gets confused when the leading character
        > of a node ID begins with a numeral.
        >
        >
        >
        > Of course the HTML spec says that the first character of an ID must be a
        > letter A-Z. it was my fault for not remembering this when I chose to use a
        > GUID as the ID. But this was especially confusing since it would fail
        > randomly (i.e. when the GUID began with a letter A-F all was fine, but a 0-9
        > would fail).
        >
        >
        >
        > Shouldn't JSLint throw a warning if the HTML ID begins with a numeral?


        Please try it now.
      • Morgaut Alexandre Louis Marc
        very good point I think this kind of thing deserve an error more than a simple warning ;-) ... [Non-text portions of this message have been removed]
        Message 3 of 3 , Jan 29, 2010
        • 0 Attachment
          very good point

          I think this kind of thing deserve an error more than a simple
          warning ;-)


          Le 28 janv. 10 � 19:25, David Rueter a �crit :

          > I noticed that JSLint does not detect a problem with HTML ID
          > attributes that
          > begin with a numeral.
          >
          > I ran into a problem the other day where YUI3 was doing something
          > really
          > strange. It turned out that YUI3 gets confused when the leading
          > character
          > of a node ID begins with a numeral.
          >
          > Of course the HTML spec says that the first character of an ID must
          > be a
          > letter A-Z. it was my fault for not remembering this when I chose to
          > use a
          > GUID as the ID. But this was especially confusing since it would fail
          > randomly (i.e. when the GUID began with a letter A-F all was fine,
          > but a 0-9
          > would fail).
          >
          > Shouldn't JSLint throw a warning if the HTML ID begins with a numeral?
          >
          > David Rueter
          >
          > drueter@...
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >



          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.