diff --git a/app/components/DocumentPreview/DocumentPreview.js b/app/components/DocumentPreview/DocumentPreview.js index 026d772cb..5131b17cb 100644 --- a/app/components/DocumentPreview/DocumentPreview.js +++ b/app/components/DocumentPreview/DocumentPreview.js @@ -141,7 +141,7 @@ class DocumentPreview extends React.Component { const queryIsInTitle = !!highlight && - !!document.title.toLowerCase().match(highlight.toLowerCase()); + !!document.title.toLowerCase().includes(highlight.toLowerCase()); return ( { }; handleTermChange = () => { - const query = this.props.match.params.term; + const query = decodeURIComponent(this.props.match.params.term || ''); this.query = query ? query : ''; this.offset = 0; this.allowLoadMore = true;