From 6d873e76fc63544673bda673ff377c0b9b810706 Mon Sep 17 00:00:00 2001 From: Tadas Vosylius <33595979+tadasvosylius@users.noreply.github.com> Date: Sun, 16 Oct 2022 20:08:36 +0300 Subject: [PATCH] fix: replace v-html with conditional rendering in torrent details view (#513) --- src/components/TorrentDetail/Tabs/Info.vue | 28 ++++++++++++++++-- src/filters.js | 10 +------ src/helpers.js | 34 ++++++++++++++++++++++ tests/unit/filters.spec.js | 22 +------------- tests/unit/helpers.spec.js | 27 +++++++++++++++++ 5 files changed, 88 insertions(+), 33 deletions(-) create mode 100644 tests/unit/helpers.spec.js diff --git a/src/components/TorrentDetail/Tabs/Info.vue b/src/components/TorrentDetail/Tabs/Info.vue index e97b4264..a65da52b 100644 --- a/src/components/TorrentDetail/Tabs/Info.vue +++ b/src/components/TorrentDetail/Tabs/Info.vue @@ -139,19 +139,34 @@ {{ $t('modals.detail.pageInfo.trackers') }} - {{ torrent.tracker }} + + + {{ trackersPart }} + {{ trackersPart }} + + {{ $t('modals.detail.pageInfo.createdBy') }} - {{ createdBy }} + + + {{ createdByPart }} + {{ createdByPart }} + + {{ $t('torrent.comments') | titleCase }} - {{ comment }} + + + {{ commentPart }} + {{ commentPart }} + + @@ -232,6 +247,7 @@