rstudio/shiny — pull request #418 by jcheng5 (2014-03-13 00:40:54+00:00)
Title: Allow '.' character in input/output IDs

This is a pretty terrifying pull request to take this late in the game, but I'm not sure if it's worse than the alternative. Let's review this together with a fine-tooth comb and then decide whether to merge it for 0.9 or wait for 0.10.

--

I always thought dots and colons were illegal in HTML ID attributes,
but I was wrong. They are legal and because they are commonly used
in identifier names in R, Shiny users often like to use them. Worse,
Shiny gave no warnings when using dots and only a pretty advanced
subset of functionality would NOT work when using dots, causing
everyone to think they were fully supported in Shiny.

This commit ought to bring reality in line with perception. It turns
out that jQuery has an escaping scheme in its queries that allow us
to support dots after all. As long as we are always careful to
surround IDs with $escape when putting them in a query, we'll be in
good shape.

Colons will probably still cause problems at the moment because we
use colons internally to separate input type from input name. But
we've never seen users try to use colon in IDs before, so we can
wait to fix it until that becomes a problem.