function escapeId(id) {
    return id.replace(/[^a-zA-Z0-9_-]/g,function(match) { return '\\' + match; });
}
Escapes a given ID to be used in a CSS selector

@private
@param {!string} id The ID to be escaped
@return {string} The escaped ID