diff --git a/changes/changelog.d/470.bugfix b/changes/changelog.d/470.bugfix new file mode 100644 index 000000000..f26c4ddc3 --- /dev/null +++ b/changes/changelog.d/470.bugfix @@ -0,0 +1 @@ +Properly encode Wikipedia and lyrics search urls (#470) diff --git a/front/src/components/library/Album.vue b/front/src/components/library/Album.vue index 03d83e064..8956d14cc 100644 --- a/front/src/components/library/Album.vue +++ b/front/src/components/library/Album.vue @@ -102,7 +102,7 @@ export default { } }, wikipediaUrl () { - return 'https://en.wikipedia.org/w/index.php?search=' + this.album.title + ' ' + this.album.artist.name + return 'https://en.wikipedia.org/w/index.php?search=' + encodeURI(this.album.title + ' ' + this.album.artist.name) }, musicbrainzUrl () { return 'https://musicbrainz.org/release/' + this.album.mbid diff --git a/front/src/components/library/Artist.vue b/front/src/components/library/Artist.vue index fe74f6f17..387596be1 100644 --- a/front/src/components/library/Artist.vue +++ b/front/src/components/library/Artist.vue @@ -151,7 +151,7 @@ export default { }).length > 0 }, wikipediaUrl () { - return 'https://en.wikipedia.org/w/index.php?search=' + this.artist.name + return 'https://en.wikipedia.org/w/index.php?search=' + encodeURI(this.artist.name) }, musicbrainzUrl () { return 'https://musicbrainz.org/artist/' + this.artist.mbid diff --git a/front/src/components/library/Track.vue b/front/src/components/library/Track.vue index 75d5f650d..040d3a466 100644 --- a/front/src/components/library/Track.vue +++ b/front/src/components/library/Track.vue @@ -196,7 +196,7 @@ export default { } }, wikipediaUrl () { - return 'https://en.wikipedia.org/w/index.php?search=' + this.track.title + ' ' + this.track.artist.name + return 'https://en.wikipedia.org/w/index.php?search=' + encodeURI(this.track.title + ' ' + this.track.artist.name) }, musicbrainzUrl () { return 'https://musicbrainz.org/recording/' + this.track.mbid @@ -211,7 +211,7 @@ export default { lyricsSearchUrl () { let base = 'http://lyrics.wikia.com/wiki/Special:Search?query=' let query = this.track.artist.name + ' ' + this.track.title - return base + query + return base + encodeURI(query) }, cover () { return null