fix attr escape function