From 8a321d4abe6f2933d03948d902ec12d4e1814a52 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Tue, 15 May 2018 18:37:44 +0200 Subject: [PATCH] Fix #201: escaping issue of track name in playlist modal --- api/funkwhale_api/music/models.py | 2 +- changes/changelog.d/201.bugfix | 1 + front/src/components/playlists/PlaylistModal.vue | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 changes/changelog.d/201.bugfix diff --git a/api/funkwhale_api/music/models.py b/api/funkwhale_api/music/models.py index 5ee5d851d..3d072042e 100644 --- a/api/funkwhale_api/music/models.py +++ b/api/funkwhale_api/music/models.py @@ -361,7 +361,7 @@ class Track(APIModelMixin): import_tags ] objects = TrackQuerySet.as_manager() - tags = TaggableManager() + tags = TaggableManager(blank=True) class Meta: ordering = ['album', 'position'] diff --git a/changes/changelog.d/201.bugfix b/changes/changelog.d/201.bugfix new file mode 100644 index 000000000..a0a25aa52 --- /dev/null +++ b/changes/changelog.d/201.bugfix @@ -0,0 +1 @@ +Fixed escaping issue of track name in playlist modal (#201) diff --git a/front/src/components/playlists/PlaylistModal.vue b/front/src/components/playlists/PlaylistModal.vue index 404948dc0..da25241ce 100644 --- a/front/src/components/playlists/PlaylistModal.vue +++ b/front/src/components/playlists/PlaylistModal.vue @@ -7,9 +7,7 @@
@@ -112,6 +110,12 @@ export default { let p = _.sortBy(this.playlists, [(e) => { return e.modification_date }]) p.reverse() return p + }, + trackDisplay () { + return this.$t('"{%title%}" by {%artist%}', { + title: this.track.title, + artist: this.track.artist.name } + ) } }, watch: {