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

WordPress Trac noreply at wordpress.org
Tue May 23 05:55:23 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 peterwilsoncc):

 In [33469] for #33106, a placeholder comment was added to `wpautop()` to
 protect new lines within `CDATA`.

 In [attachment:"58366-poc.diff"] I've done something similar for
 protecting new lines within shortcodes for block themes. It uses the
 slightly more verbose `wp-block-theme-line-break-placeholder` to avoid
 collisions with wpautop placeholders.

 I've done some minimal testing using the shortcode in [comment:3 comment
 3] but if the approach is validated, it will need a rewrite as the POC
 uses closures unnecessarily.

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


More information about the wp-trac mailing list