Ensure no illegal characters are in the tag