File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export function search(query) {
178
178
keywords . forEach ( keyword => {
179
179
// From https://github.com/sindresorhus/escape-string-regexp
180
180
const regEx = new RegExp (
181
- ignoreDiacriticalMarks ( keyword ) . replace (
181
+ escapeHtml ( ignoreDiacriticalMarks ( keyword ) ) . replace (
182
182
/ [ | \\ { } ( ) [ \] ^ $ + * ? . ] / g,
183
183
'\\$&'
184
184
) ,
@@ -187,10 +187,10 @@ export function search(query) {
187
187
let indexTitle = - 1 ;
188
188
let indexContent = - 1 ;
189
189
handlePostTitle = postTitle
190
- ? ignoreDiacriticalMarks ( postTitle )
190
+ ? escapeHtml ( ignoreDiacriticalMarks ( postTitle ) )
191
191
: postTitle ;
192
192
handlePostContent = postContent
193
- ? ignoreDiacriticalMarks ( postContent )
193
+ ? escapeHtml ( ignoreDiacriticalMarks ( postContent ) )
194
194
: postContent ;
195
195
196
196
indexTitle = postTitle ? handlePostTitle . search ( regEx ) : - 1 ;
You can’t perform that action at this time.
0 commit comments