Convert special characters to HTML entities