escape tags with special characters in the them properly