Escaping double quotes in the to_attributes method to allow for single quotes in attribute values.