I'm not sure we want to support cleaning such mess. See what [HTML 4.01 standard says about ID values](http://www.w3.org/TR/html4/types.html#type-id)

Only thing I've found in [HTML 5.1 working draft](http://www.w3.org/html/wg/drafts/html/master/syntax.html#attributes-0) is much more permissive. If that would be it, we actually shouldn't do such filtering, might think about escaping though.

So I would just say that developer CAN hurt himself and I'm not convinced we should prevent it in this case (BTW, it seems that you filter out `:` which is actually valid one).

/cc @mrclay @ewinslow