diff --git a/app/views/admin/communication/photo_imports/_selector.html.erb b/app/views/admin/communication/photo_imports/_selector.html.erb
index b2c29a8e8158df39e0e1bbc04190766bf5bf828e..3e1514af1548e3da8d3d36cc9b071f3ea49b8177 100644
--- a/app/views/admin/communication/photo_imports/_selector.html.erb
+++ b/app/views/admin/communication/photo_imports/_selector.html.erb
@@ -239,7 +239,7 @@ pexels_path = admin_communication_pexels_path(website_id: nil, extranet_id: nil,
       },
       searchUnsplash() {
         var url = this.unsplash.url
-                      + '?query=' + this.query
+                      + '?query=' + encodeURIComponent(this.query)
                       + '&page=' + this.unsplash.page
                       + '&per_page=' + this.parameters.per_page
                       + '&lang=' + this.parameters.lang
@@ -247,7 +247,7 @@ pexels_path = admin_communication_pexels_path(website_id: nil, extranet_id: nil,
       },
       searchPexels() {
         var url = this.pexels.url
-                    + '?query=' + this.query
+                    + '?query=' + encodeURIComponent(this.query)
                     + '&page=' + this.pexels.page
                     + '&per_page=' + this.parameters.per_page
                     + '&lang=' + this.parameters.lang