Skip to content

Commit 374bed5

Browse files
committed
fix: Refine contentSnippet processing in Feed component
- Updated the contentSnippet extraction to replace non-breaking spaces with regular spaces and to convert HTML encoded apostrophes to standard apostrophes for improved readability. - Enhanced the overall quality of post descriptions in the Feed component.
1 parent 2696f21 commit 374bed5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

components/feed.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ const Feed = () => {
3535
contentSnippet: post.querySelector("description")
3636
?.textContent
3737
?.replace(/<[^>]*>/g, '') // strip HTML
38-
?.replace(/&#160;/g, '') // strip out &#160;
38+
?.replace(/&#160;/g, ' ') // strip out &#160;
39+
?.replace(/&#8217;/g, "'") // strip out &#8217;
3940
?.trim(),
4041
image: post.querySelector("content")?.getAttribute("url")
4142
}))

0 commit comments

Comments
 (0)