This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21353 - While I can't find it on this page, presumably the valid characters in an attribute value does not include : So wherever the spec is for valid chars in attribute value, that's the answer for this one.
Summary: While I can't find it on this page, presumably the valid characters in an att...
Status: RESOLVED NEEDSINFO
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-20 17:34 UTC by contributor
Modified: 2013-04-14 06:51 UTC (History)
2 users (show)

See Also:


Attachments

Description contributor 2013-03-20 17:34:28 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html
Multipage: http://www.whatwg.org/C#syntax-attribute-value
Complete: http://www.whatwg.org/c#syntax-attribute-value

Comment:
While I can't find it on this page, presumably the valid characters in an
attribute value does not include :  So wherever the spec is for valid chars in
attribute value, that's the answer for this one.

Posted from: 67.162.103.133
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:19.0) Gecko/20100101 Firefox/19.0
Comment 1 Ian 'Hixie' Hickson 2013-04-01 18:27:49 UTC
Nope, colons are fine in general.

What exactly is allowed in attribute values depends on the attribute and on the syntax used for the attribute. For example, this is invalid:

   title=can't do this

...because apostrophes and spaces aren't valid in unquoted attribute values. On the other hand, this is fine:

   title="y'all CAN do this"

...because those characters are fine when quoted. But it depends on the quotes; this isn't valid, for example:

   title='can't do this'

But some attributes are even more constrained, e.g.:

   dir="can't do this"

...is invalid because dir="" only takes a few values like "ltr" and "rtl".


The text at the place in the spec where you were gives the broad requirements:
   http://www.whatwg.org/C#syntax-attribute-value

Is that insufficiently clear?