Skip to content

Commit 1c31813

Browse files
committed
MAGE-793 Fix bug for filtering IS categories containing quotes
1 parent 026624f commit 1c31813

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

view/frontend/web/instantsearch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ define(
112112
}
113113

114114
if (algoliaConfig.instant.isVisualMerchEnabled && algoliaConfig.isCategoryPage ) {
115-
searchParameters.filters = `${algoliaConfig.instant.categoryPageIdAttribute}:'${algoliaConfig.request.path}'`;
115+
searchParameters.filters = `${algoliaConfig.instant.categoryPageIdAttribute}:"${algoliaConfig.request.path.replace(/"/g, '\\"')}"`;
116116
}
117117

118118
instantsearchOptions = algolia.triggerHooks('beforeInstantsearchInit', instantsearchOptions, algoliaBundle);
@@ -726,4 +726,4 @@ define(
726726
return options;
727727
}
728728
}
729-
);
729+
);

0 commit comments

Comments
 (0)