[wp-trac] [WordPress Trac] #58366: Shortcode Support Regained but Content Filters are messing with Shortcode HTML

WordPress Trac noreply at wordpress.org
Fri Jun 9 18:11:55 UTC 2023


#58366: Shortcode Support Regained but Content Filters are messing with Shortcode
HTML
-------------------------------------------------+-------------------------
 Reporter:  domainsupport                        |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Shortcodes                           |     Version:  6.2.2
 Severity:  normal                               |  Resolution:
 Keywords:  needs-testing has-testing-info       |     Focuses:
  needs-unit-tests                               |
-------------------------------------------------+-------------------------

Comment (by brumack):

 Replying to [comment:36 bekk]:
 > My patch draws on the observation that the shortcode block should not be
 autop'ing its own content. It is noted in `the_content` filters that
 shortcodes should be processed ''after'' `wpautop()`, I don't see why the
 shortcode block is any different.
 >
 > I also added shortcode processing to the core block, which restores
 shortcodes in template parts and reusable blocks.
 >
 > My patch is attached above for review

 This unfortunately doesn't address blocks using shortcodes saved to block
 attributes and rendered as html *after* do_blocks is called, so anything
 using serverside rendering and used inside a template part will not
 benefit.

 When used inside post_content, these serverside rendered shortcodes are
 processed normally, so there's a discrepancy between how blocks are
 rendered in post content and in template parts.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58366#comment:43>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list