Skip to content

Commit

Permalink
Sanitize invalid unicode symbols in token metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
MS committed Sep 23, 2022
1 parent 9a7f6c2 commit 27dd890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tzkt.Sync/Services/TokenMetadata/TokenMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ async Task<int> SaveTokenMetadata(List<DipDupItem> items)
{
if (any) sql.AppendLine(",");
else any = true;
param.Add($"@p{j}", JsonSerializer.Serialize(item.Metadata, options));
param.Add($"@p{j}", JsonSerializer.Serialize(item.Metadata, options).Replace("\u0000", string.Empty));
sql.Append($"({contractId}, '{item.TokenId}', @p{j}::jsonb)");
}
}
Expand Down

0 comments on commit 27dd890

Please sign in to comment.