Better handling for attributes with HTML entities in them