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

Stats Insights: strip html from post title. #17380

Merged
merged 2 commits into from
Oct 28, 2021

Conversation

ScoutHarris
Copy link
Contributor

@ScoutHarris ScoutHarris commented Oct 28, 2021

Fixes #17023

This strips HTML tags from the post title when displayed in the Latest Post Summary block.

To note, I poked around other post titles in Stats, and we do strip HTML elsewhere, so I did it here to match.

To test:

  • Create a post with HTML in the title (like <em>My awesome title</em>).
    • You may want to do it in a browser. When created in the app, the HTML is treated as regular text. It is stripped correctly in Stats, it just looks weird elsewhere.
  • Go to Stats > Insights > Latest Post Summary.
    • If it's not listed, you may need to add it via the Add stats card option at the bottom.
  • Verify the HTML is not displayed in the post title.
Before After
before after

Regression Notes

  1. Potential unintended areas of impact
    N/A

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    N/A

  3. What automated tests I added (or what prevented me from doing so)
    N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Oct 28, 2021

You can trigger an installable build for these changes by visiting CircleCI here.

@ScoutHarris ScoutHarris requested a review from dvdchr October 28, 2021 00:57
@ScoutHarris ScoutHarris marked this pull request as ready for review October 28, 2021 00:57
@ScoutHarris
Copy link
Contributor Author

Hey @dvdchr . Would you mind another random review please? Thank you! 🙇

@peril-wordpress-mobile
Copy link

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

Copy link
Contributor

@dvdchr dvdchr left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

@ScoutHarris ScoutHarris merged commit 7708341 into develop Oct 28, 2021
@ScoutHarris ScoutHarris deleted the fix/17023-insights_post_title_html branch October 28, 2021 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stats: HTML entity not stripped from title in Insights
2 participants