properly quote quotes in type field