diff --git a/src/base/bittorrent/peerinfo.cpp b/src/base/bittorrent/peerinfo.cpp index 9fb6db21a..cf27ba302 100644 --- a/src/base/bittorrent/peerinfo.cpp +++ b/src/base/bittorrent/peerinfo.cpp @@ -198,7 +198,12 @@ QString PeerInfo::I2PAddress() const QString PeerInfo::client() const { - return QString::fromStdString(m_nativeInfo.client); + auto client = QString::fromStdString(m_nativeInfo.client).simplified(); + + // remove non-printable characters + erase_if(client, [](const QChar &c) { return !c.isPrint(); }); + + return client; } QString PeerInfo::peerIdClient() const