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

WordPress Trac noreply at wordpress.org
Tue Jan 28 01:34:51 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:
Component:  Shortcodes                    |     Version:  3.7.1
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+-----------------------

Comment (by dd32):

 I tend to agree that simply encoding the shortcode as text makes sense, as
 that's what the string is after `strip_shortcodes()` has run.

 I would not expect the encoded shortcode to be completely removed, nor
 would I expect it to be escaped still, so encoding it such that
 `do_shortcode( strip_shortcode( '[[example]]' ) )` doesn't execute the
 `example` shortcode makes sense to me.

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


More information about the wp-trac mailing list