Core: Escape dollar sign in error id

Fix non label error elements containing $ character in the name/id
(asp.net web forms) causing syntax error in sizzlejs.

Fixes #1331
Closes #1336