Make sure HTML entities are encoded properly