@constructor-io/constructorio-node 4.10.0 → 4.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-node",
3
- "version": "4.10.0",
3
+ "version": "4.10.1",
4
4
  "description": "Constructor.io Node.js client",
5
5
  "main": "src/constructorio.js",
6
6
  "types": "src/types/constructorio.d.ts",
@@ -112,7 +112,8 @@ function createAutocompleteUrl(query, parameters, userParameters, options) {
112
112
  const queryString = qs.stringify(queryParams, { indices: false });
113
113
  const cleanedQuery = query.replace(/^\//, '|'); // For compatibility with backend API
114
114
 
115
- return `${serviceUrl}/autocomplete/${helpers.encodeURIComponentRFC3986(helpers.trimNonBreakingSpaces(cleanedQuery))}?${queryString}`;
115
+ // Note: it is intentional that query is dispatched without being trimmed
116
+ return `${serviceUrl}/autocomplete/${helpers.encodeURIComponentRFC3986(cleanedQuery)}?${queryString}`;
116
117
  }
117
118
 
118
119
  /**
@@ -145,7 +145,8 @@ function createSearchUrl(query, parameters, userParameters, options, isVoiceSear
145
145
 
146
146
  const searchUrl = isVoiceSearch ? 'search/natural_language' : 'search';
147
147
 
148
- return `${serviceUrl}/${searchUrl}/${helpers.encodeURIComponentRFC3986(helpers.trimNonBreakingSpaces(query))}?${queryString}`;
148
+ // Note: it is intentional that query is dispatched without being trimmed
149
+ return `${serviceUrl}/${searchUrl}/${helpers.encodeURIComponentRFC3986(query)}?${queryString}`;
149
150
  }
150
151
 
151
152
  /**