standardize formatting for `attributes` attribute