From 4da4dd942387ba68d9c76559624626d594d71f0b Mon Sep 17 00:00:00 2001 From: dbroqua Date: Wed, 14 Sep 2022 14:30:27 +0200 Subject: [PATCH] =?UTF-8?q?#62=20-=20=C3=89chaper=20les=20&=20dans=20les?= =?UTF-8?q?=20urls=20des=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/pages/collection.ejs | 8 ++++---- views/pages/mon-compte/ma-collection/index.ejs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) 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)