Escape a CSS identifier. This function is slightly more
permissive than the CSS standard. For example, it does not reject
identifiers that begin with two hyphens. The function always
special characters such as the tilde (
~) or left
[). As such, they will never be interpreted as special
Escape a CSS string value. This function is conservative and produces only output characters in the US-ASCII range. This comes at the cost of space usage, so this function should not be used to encode strings expected to contain a disproportionate amount of non-US-ASCII characters.