-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(hits): opt-in xss filtering for hits and infinite hits. FIX #2138
* feat(connectHits): handle XSS and escape HTML entities * test(connectHits): ensure hit are correctly escaped * feat(connectHits): remove flagged boolean * feat(connectHits): add `escapeHits` and `escapeHitsWhitelist` options * feat(hitsWidget): support `escapeHits` and `escapeHitsWhitelist * test(hitsWidget): should throw on incorrect options * fix(connectHits): replace <em> from objects into highlightProperties * fix(connectHits): replace Array.includes with Array.indexOf * refactor(escapeHits): export function, escape only highlight * refactor(connectHits): use `escapeHighlight` helper * refactor(connectHits): use tag config from `escapeHighlight * test(connectHits): separated test for escape highlight property * refactor(connectHits): always escape highlight property * feat(connectInfiniteHits): always escape highlight property * fix(escape-highlight): ensure `results.hits` is escaped only once * feat(hits): opt-in for escaping hits * feat(infinite-hits): opt-in for escape * test(hits): remove un-used test
- Loading branch information
Showing
9 changed files
with
361 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.