WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#8846 closed enhancement (worksforme)

Shortcodes should be stripped from excerpts

Reported by: rmccue Owned by:
Priority: normal Milestone:
Component: Shortcodes Version: 2.7
Severity: minor Keywords:
Cc:

Description

Shortcodes are currently left as text in automatically generated excerpts.

As most users won't want the content of these shortcodes put in, such as in the case where it embeds a video, they should be stripped from the content in the same way that HTML tags are, most likely through a regex.

Change History (6)

comment:1 FFEMTcJ4 years ago

  • Keywords needs-patch added

comment:2 ryan4 years ago

  • Component changed from General to Shortcodes
  • Owner anonymous deleted

comment:3 janeforshort4 years ago

  • Milestone changed from 2.8 to Future Release

Punting due to time constraints, will reconsider for upcoming release cycle.

comment:4 Denis-de-Bernardy4 years ago

in many ways this is by design. there were bugs around when they weren't stripped.

comment:5 coffee2code3 years ago

  • Keywords needs-patch removed
  • Resolution set to worksforme
  • Status changed from new to closed

I believe this got fixed somewhere along the way.

Possibly a dup of #7100, fixed in r8054?

Valid shortcodes are currently fully stripped from automatically generated excerpts. This is the case for singular shortcodes (i.e. [tester] or [tester/]) and opening/closing shortcodes (i.e. [tester]This may contain shortcode-related text that is gibberish if the shortcode replacement does not occur[/tester]). In all these cases, the shortcode itself (including closing shortcode), attributes, and wrapped text, are stripped.

comment:6 nacin3 years ago

  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.