[wp-trac] [WordPress Trac] #58333: WordPress 6.2.1 Shortcodes some shortcode no longer works!

WordPress Trac noreply at wordpress.org
Thu May 18 13:41:26 UTC 2023


#58333: WordPress 6.2.1 Shortcodes some shortcode no longer works!
--------------------------+-----------------------
 Reporter:  jorcus        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  6.2.2
Component:  Shortcodes    |     Version:  6.2.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------

Comment (by asafm7):

 You don't need to do anything special. Just pass the whole raw template
 content through do_shortcode(). The raw template content doesn't include
 user-generated content. I'm pretty sure I've done it before.

 Replying to [comment:66 domainsupport]:
 > Replying to [comment:7 andergmartins]:
 > > For those who want to stay on 6.2.1 and need to restore the support
 for shortcodes on templates, you can try this workaround.
 > >
 > > Add the following code as a plugin in a PHP file in the plugins
 folder:
 > >
 > > But be aware that support was removed for fixing a security issue, and
 restoring shortcode support you are probably bringing back the security
 issue.
 >
 > Just a thought ... but could this code be modified to look at **each**
 part of the $parsed_block and search for shortcode blocks (perhaps with a
 suitable regex) and then **just** run `do_shortcode()` **only** on the
 shortcode block content? Surely that would allow shortcode support
 **without** the security risk ... ?

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


More information about the wp-trac mailing list