convert all special characters in a string to their corresponding HTML and CSS entities