sanitize_id: Encodes ids to be used in JavaScript and Shiny
Description
Replaces non-ASCII characters into a format that can be used in HTML,
JavaScript and Shiny.
When the id has a character that is not allowed, it is replaced with "_"
and a 4 character hash of the original id is added to the start of the
resulting id.
Usage
sanitize_id(id)
Value
Sanitized string that removes special characters and spaces.