parse tag attributes and replace/add if needed (BAC-203)