#7658 - Fix DC template HTML escaping

Explicity cast terms as strings because when term objects get returned, you can echo them and they'll print as a string but esc_specialcharacters won't actually escape the special characters because it checks if the data its given is a string.