Skip to content

Commit

Permalink
fix: don't use document
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasgriffintn committed Aug 25, 2024
1 parent b0070b7 commit 86e4c29
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/web/app/components/homepage/search-result-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { Button } from '../ui/button';
import { Modal } from '../modal/base';

function stripHtmlTags(html: string): string {
const div = document.createElement('div');
div.innerHTML = html;
return div.textContent || div.innerText || '';
return html.replace(/<\/?[^>]+(>|$)/g, '');
}

export const SearchResultItem = ({
Expand Down

0 comments on commit 86e4c29

Please sign in to comment.