Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added HTML sanitization to the blogs card #259

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

gautamkrishnar
Copy link
Contributor

@gautamkrishnar gautamkrishnar commented Jan 16, 2024

Why

The WordPress API returns HTML instead of plain text it will cause blog post card to break since react needs them as plain text:

Screenshot 2024-01-16 at 10 15 19 PM

The fix

Added HTML to plain text encoding to prevent this from happening. This will also remove all the unnecessary <p> tags added by the WP API.

Screenshot 2024-01-16 at 10 15 29 PM

Copy link
Member

@ashley-cui ashley-cui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than this nit, LGTM. Thanks for the PR!

@rhatdan
Copy link
Member

rhatdan commented Jan 18, 2024

/approve
/lgtm

@TomSweeneyRedHat
Copy link
Member

LGTM

@TomSweeneyRedHat TomSweeneyRedHat merged commit 64a48fc into containers:main Jan 22, 2024
3 checks passed
@gautamkrishnar gautamkrishnar deleted the fix/html branch January 23, 2024 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants