Skip to content

Commit

Permalink
TorrentGeneralInfo: drop leading and trailing whitespaces from comment (
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 authored Oct 17, 2023
1 parent 7117764 commit 1192e14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}

Expand Down

0 comments on commit 1192e14

Please sign in to comment.