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

Video Sitemap: description should filter out HTML tags #9546

Closed
htdat opened this issue May 14, 2018 · 3 comments · Fixed by #13261
Closed

Video Sitemap: description should filter out HTML tags #9546

htdat opened this issue May 14, 2018 · 3 comments · Fixed by #13261
Labels
Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" [Feature] Sitemaps [Pri] Normal [Type] Bug When a feature is broken and / or not performing as intended
Milestone

Comments

@htdat
Copy link
Member

htdat commented May 14, 2018

Steps to reproduce the issue

  1. Upload a new video to Media Libary
  2. Add the description of the video, which includes HTML tags like <p>something</p>.
  3. Check the sitemap.

What I expected

Just something without the HTML tags.

What happened instead

It displays exactly like <p>something</p>

screen shot on 2018-05-14 at 10_57_25

Ref: 1148771-zen

@htdat htdat added [Type] Bug When a feature is broken and / or not performing as intended [Feature] Sitemaps [Pri] Low labels May 14, 2018
@stale
Copy link

stale bot commented Nov 10, 2018

This issue has been marked as stale. This happened because:

  • It has been inactive in the past 6 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

@stale
Copy link

stale bot commented May 11, 2019

This issue has been marked as stale. This happened because:

  • It has been inactive in the past 6 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

@stale stale bot added the [Status] Stale label May 11, 2019
@matticbot matticbot added the Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" label May 11, 2019
@stale stale bot removed the [Status] Stale label May 11, 2019
@htdat
Copy link
Member Author

htdat commented Jul 30, 2019

I tracked down the related code:

/** This filter is already documented in core/wp-includes/post-template.php */
$content = apply_filters( 'the_content', $content );
/** This filter is already documented in core/wp-includes/feed.php */
$content = apply_filters( 'the_content_feed', $content, 'rss2' );

A possible solution is to add another filter:

$content = wp_strip_all_tags ( $content, true );

I will test again and propose a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" [Feature] Sitemaps [Pri] Normal [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
3 participants