keep attributes in attributed string