Properly escape selected attributes