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

Post Excerpt Block: Allow inline html tags #74675

Open
supernovia opened this issue Mar 20, 2023 · 7 comments
Open

Post Excerpt Block: Allow inline html tags #74675

supernovia opened this issue Mar 20, 2023 · 7 comments
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Full Site Editor The site editor. [Pri] Normal Schedule for the next available opportuinity. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@supernovia
Copy link
Contributor

What

The Post Excerpt has traditionally allowed limited HTML formatting (strong, em, etc), but it's being stripped by the Post Excerpt Block. Could we have an option to keep formatting?

Why

People like being able to format their excerpts by hand for many reasons. Here's one case; our user wants to add a little extra meta to the excerpt, and it works fine unless they use the Post Excerpt Block for designing their site. I'm aware of people hand-formatting their exceprts for a variety of other reasons, too: haiku, adding links, sectioning off a part for emphasis, etc. And that all gets lost if we use the Post Excerpt Block.

The workaround for now is to use some other posts-related block, but they don't offer as much control as the query loop.

How

The Post Exceprt Block has its own text-formatting features, and I wonder if that's why they're being stripped. Maybe we could only strip tags if one of those features is utilized, and otherwise display the inline HTML as entered?

@supernovia supernovia added the [Type] Feature Request Feature requests label Mar 20, 2023
@cuemarie cuemarie added the [Pri] Normal Schedule for the next available opportuinity. label Mar 21, 2023
@cuemarie
Copy link

cuemarie commented Mar 29, 2023

📌 ACTIONS

📌 Message to Author

  • @supernovia not sure what your handle is for that repo, so I couldn't tag you, but please add a comment to take ownership of that, I think your suggestions are great, and you may get follow up questions!

@cuemarie cuemarie added the [Feature] Full Site Editor The site editor. label Mar 29, 2023
@cuemarie cuemarie added the [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. label Mar 29, 2023
@cuemarie cuemarie added the [Type] Bug When a feature is broken and / or not performing as intended label Jul 5, 2023
@cuemarie
Copy link

cuemarie commented Jul 5, 2023

From the Core report:

I think the problem is a bug. The post excerpt should not remove HTML tags by default, but this block removes HTML tags on the front end. Below are the results of the test on Twenty Twenty One.

--> WordPress/gutenberg#49449 (comment)

📌 ACTIONS

  • Relabeled as a bug, and moved to Non-Urgent

📌 Message to HEs

  • Please track any interactions about this issue here on this report, not the Gutenberg issue. Thanks!

@cuemarie cuemarie removed the [Type] Feature Request Feature requests label Jul 5, 2023
@lizkarkoski
Copy link

7123938-zen

Behavior - the user is unable to use html to create line breaks in the post excerpts.
Screenshot 2023-11-06 at 5 20 30 AM
Screenshot 2023-11-06 at 5 20 52 AM

Copy link

github-actions bot commented Nov 8, 2023

Support References

This comment is automatically generated. Please do not edit it.

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Nov 8, 2023
@Daife222
Copy link

Daife222 commented Jan 6, 2024

Html in excerpt is/was for me very useful.
Please upgrade the bug resolution urgency from "non-urgent".
Wordpress 6.4.2.
Thanks

@Peter-HVD
Copy link

I agree with @Daife222 - this should be marked as an urgent bug because it is long-established WordPress functionality that HTML tags are not stripped from custom excerpts. I have just built a site with a block theme for the first time, and my client is confused and complains that it is not working as their previous theme did. It's not acceptable to have to say "the WordPress people have taken an arbitrary decision to change the way it works and there's nothing I can do about it".

@Mfarroq1
Copy link

7868097-zen

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. Previously known as "Happiness Request". [Feature] Full Site Editor The site editor. [Pri] Normal Schedule for the next available opportuinity. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

6 participants