浏览代码

fix city search for special cars

Olivier Massot 4 年之前
父节点
当前提交
026a7cd9d2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      components/Ui/Search/Address.vue

+ 1 - 1
components/Ui/Search/Address.vue

@@ -121,7 +121,7 @@ export default Vue.extend({
       let apiUrl = 'https://api-adresse.data.gouv.fr/search/' +
                      `?type=${this.type}` +
                      `&autocomplete=${this.autocomplete ? 1 : 0}` +
-                     `&q=${encodeURI(val.replace(/\s+/gi, '+'))}`
+                     `&q=${val.replace(/[\s&?]/gi, '+')}`
 
       if (this.limit > 0) {
         apiUrl += `&limit=${this.limit}`