diff --git a/client/src/javascript/components/general/LinkedText.tsx b/client/src/javascript/components/general/LinkedText.tsx index a49ccdb3a..b0f4b1458 100644 --- a/client/src/javascript/components/general/LinkedText.tsx +++ b/client/src/javascript/components/general/LinkedText.tsx @@ -18,15 +18,19 @@ function isValidHttpUrl(s: string) { } const LinkedText: FC = ({text, className}: LinkedTextProps) => { - const nodes = text.split(/\s/).map((s) => - isValidHttpUrl(s.trimEnd()) ? ( - - {s} - - ) : ( - s - ), - ); + const nodes = text.split(/([ \n])/).map((s) => { + if (s === '\n') { + return
; + } + if (isValidHttpUrl(s)) { + return ( + + {s} + + ); + } + return s; + }); return {nodes}; }; diff --git a/client/src/javascript/components/modals/torrent-details-modal/TorrentGeneralInfo.tsx b/client/src/javascript/components/modals/torrent-details-modal/TorrentGeneralInfo.tsx index 5840477ac..e700eafb1 100644 --- a/client/src/javascript/components/modals/torrent-details-modal/TorrentGeneralInfo.tsx +++ b/client/src/javascript/components/modals/torrent-details-modal/TorrentGeneralInfo.tsx @@ -207,7 +207,7 @@ const TorrentGeneralInfo: FC = observer(() => { - {torrent.comment ? : VALUE_NOT_AVAILABLE} + {torrent.comment ? : VALUE_NOT_AVAILABLE} diff --git a/server/services/rTorrent/constants/methodCallConfigs/torrentList.ts b/server/services/rTorrent/constants/methodCallConfigs/torrentList.ts index da7938f97..be4436f89 100644 --- a/server/services/rTorrent/constants/methodCallConfigs/torrentList.ts +++ b/server/services/rTorrent/constants/methodCallConfigs/torrentList.ts @@ -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 ''; }