-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Ticket 56780 #3851
base: trunk
Are you sure you want to change the base?
Ticket 56780 #3851
Conversation
Thanks for this, @petitphp! Because this PR goes beyond handling There are still a couple of |
@ironprogrammer Thanks for taking the time to do another round of testing! As suggested, I've expanded the test cases for the change based on the ones you mentioned on your report. |
Add set of typical actions run on `the_content` to the `block_template_part` function. This replicate the behavior of the template part block's render method.
590ed44
to
189be9a
Compare
$content = wptexturize( $content ); | ||
$content = convert_smilies( $content ); | ||
$content = shortcode_unautop( $content ); | ||
$content = wp_filter_content_tags( $content ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felixarntz Do you have any idea how this will effect fetch priority or other image
I think this PR introduces some subtle security issues. For example an anonymous user can use a shortcode in a comment to render private data in the frontend. (comments being rendered by a block comments block) |
The template part block does something like this:
I wonder if there's a way to reuse that code in both places, one could use the other or rely on a common function. (It might require the changes to be made in the Gutenberg repository) |
Did you use a theme that uses the function above to render a "template part" that contains the comments block? |
+1 |
@petitphp Thanks for the PR. Can you please check the conflicts 🙏 |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @[email protected]. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. Core Committers: Use this line as a base for the props when committing in SVN:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Update
block_template_part
to expand shortcodes in template partsAdd set of typical actions run on
the_content
to theblock_template_part
function. This replicate the behavior of the template part block's render method.Trac ticket: https://core.trac.wordpress.org/ticket/56780
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.