File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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) {
178178 keywords . forEach ( keyword => {
179179 // From https://github.com/sindresorhus/escape-string-regexp
180180 const regEx = new RegExp (
181- ignoreDiacriticalMarks ( keyword ) . replace (
181+ escapeHtml ( ignoreDiacriticalMarks ( keyword ) ) . replace (
182182 / [ | \\ { } ( ) [ \] ^ $ + * ? . ] / g,
183183 '\\$&'
184184 ) ,
@@ -187,10 +187,10 @@ export function search(query) {
187187 let indexTitle = - 1 ;
188188 let indexContent = - 1 ;
189189 handlePostTitle = postTitle
190- ? ignoreDiacriticalMarks ( postTitle )
190+ ? escapeHtml ( ignoreDiacriticalMarks ( postTitle ) )
191191 : postTitle ;
192192 handlePostContent = postContent
193- ? ignoreDiacriticalMarks ( postContent )
193+ ? escapeHtml ( ignoreDiacriticalMarks ( postContent ) )
194194 : postContent ;
195195
196196 indexTitle = postTitle ? handlePostTitle . search ( regEx ) : - 1 ;
You can’t perform that action at this time.
0 commit comments