More reliable data attribute parsing