Fix #470: Properly encode Wikipedia and lyrics search urls

merge-requests/466/head
Eliot Berriot 2018-10-20 16:14:59 +02:00
rodzic 3a5a446509
commit a8f7893def
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
4 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -0,0 +1 @@
Properly encode Wikipedia and lyrics search urls (#470)

Wyświetl plik

@ -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

Wyświetl plik

@ -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

Wyświetl plik

@ -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