diff --git a/views/pages/collection.ejs b/views/pages/collection.ejs index a558cd7..9960983 100644 --- a/views/pages/collection.ejs +++ b/views/pages/collection.ejs @@ -196,19 +196,19 @@ let url = `/api/v1/albums?userId=${this.userId}&page=${this.page}&limit=${this.limit}&sort=${this.sort}&order=${this.order}`; if ( this.artist ) { - url += `&artists_sort=${this.artist}`; + url += `&artists_sort=${this.artist.replace('&', '%26')}`; } if ( this.format ) { - url += `&format=${this.format}`; + url += `&format=${this.format.replace('&', '%26')}`; } if ( this.year ) { url += `&year=${this.year}`; } if ( this.genre ) { - url += `&genre=${this.genre}`; + url += `&genre=${this.genre.replace('&', '%26')}`; } if ( this.style ) { - url += `&style=${this.style}`; + url += `&style=${this.style.replace('&', '%26')}`; } axios.get(url) diff --git a/views/pages/mon-compte/ma-collection/index.ejs b/views/pages/mon-compte/ma-collection/index.ejs index 9ee59fc..fb67cd3 100644 --- a/views/pages/mon-compte/ma-collection/index.ejs +++ b/views/pages/mon-compte/ma-collection/index.ejs @@ -250,19 +250,19 @@ let url = `/api/v1/albums?page=${this.page}&limit=${this.limit}&sort=${this.sort}&order=${this.order}`; if ( this.artist ) { - url += `&artists_sort=${this.artist}`; + url += `&artists_sort=${this.artist.replace('&', '%26')}`; } if ( this.format ) { - url += `&format=${this.format}`; + url += `&format=${this.format.replace('&', '%26')}`; } if ( this.year ) { url += `&year=${this.year}`; } if ( this.genre ) { - url += `&genre=${this.genre}`; + url += `&genre=${this.genre.replace('&', '%26')}`; } if ( this.style ) { - url += `&style=${this.style}`; + url += `&style=${this.style.replace('&', '%26')}`; } axios.get(url)