mirror of
https://github.com/zoriya/flood.git
synced 2026-05-28 09:27:35 +00:00
TorrentGeneralInfo: drop leading and trailing whitespaces from comment (#674)
This commit is contained in:
+1
-1
@@ -207,7 +207,7 @@ const TorrentGeneralInfo: FC = observer(() => {
|
||||
<Trans id="torrents.details.general.comment" />
|
||||
</td>
|
||||
<td className="torrent-details__detail__value">
|
||||
{torrent.comment ? <LinkedText text={torrent.comment} /> : VALUE_NOT_AVAILABLE}
|
||||
{torrent.comment ? <LinkedText text={torrent.comment.trim()} /> : VALUE_NOT_AVAILABLE}
|
||||
</td>
|
||||
</tr>
|
||||
<tr className="torrent-details__table__heading">
|
||||
|
||||
@@ -22,7 +22,7 @@ const torrentListMethodCallConfigs = {
|
||||
methodCall: 'd.custom2=',
|
||||
transformValue: (value: unknown): string => {
|
||||
// ruTorrent sets VRS24mrkr as a comment prefix, so we use it as well for compatability
|
||||
if (value === '' || typeof value !== 'string' || value.indexOf('VRS24mrker') !== 0) {
|
||||
if (value === '' || typeof value !== 'string' || !value.startsWith('VRS24mrker')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user