Modified to handle special characters <> and &