Skip to content

Commit

Permalink
Fix incomplete multi-character sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
myrotvorets-team committed Oct 8, 2023
1 parent 34c9292 commit 4c45536
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/wpapi.mts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function getPosts(baseUrl: string): Promise<PostData[]> {
id: post.id,
link: post.link,
title: post.title.rendered,
excerpt: post.excerpt.rendered.replace(/<[^>]+>/gu, ''),
excerpt: post.excerpt.rendered.replace(/<[^>]+(>|$)/gu, ''),
featuredMedia: post.featured_media,
}),
);
Expand Down

0 comments on commit 4c45536

Please sign in to comment.