[wp-trac] [WordPress Trac] #26649: escaped shortcodes should not be expanded during 'get_the_excerpt'

WordPress Trac noreply at wordpress.org
Fri Jan 31 13:00:48 UTC 2025


#26649: escaped shortcodes should not be expanded during 'get_the_excerpt'
-------------------------------------------------+-------------------------
 Reporter:  bobbingwide                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Shortcodes                           |     Version:  3.7.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch good-first-bug has-unit-   |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by michaelwp85):

 I've created a pull request with a fix and updated unit tests.

 There is one scenario in which I revert the html entities back into
 brackets, this is when an escaped shortcode is used inside an attribute.
 Specifically for this test scenario: `<div
 style="selector:url([[gallery]])">`
 If I do not revert the HTML entities will interfere with the processing of
 `safecss_filter_attr` stripping the code.

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


More information about the wp-trac mailing list