[wp-trac] [WordPress Trac] #49877: Content enclosed by (content enclosing) shortcode gets stripped from excerpt
WordPress Trac
noreply at wordpress.org
Sat Apr 11 13:36:57 UTC 2020
#49877: Content enclosed by (content enclosing) shortcode gets stripped from
excerpt
--------------------------+-----------------------------
Reporter: mmwbadmin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: 5.4
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Hi,
I’m using a plugin to create popups with information from Wikipedia by
enclosing a term in shortcode. Like this
“Terwijl voormalig [wiki]Goldman Sachs[/wiki] bankier” (text in Gutenberg
Paragraph Block, bold by me)
On a Blog Page and in a Latest Posts Block with non-manual excerpts the
following output is rendered:
“Terwijl voormalig bankier”
Both the shortcode and the enclosed content are gone (due to
wp_trim_excerpt? as called by the_excerpt() ). Whereas content enclosed in
HTML tags stays in place.
The excerpt would preferably read:
“Terwijl voormalig Goldman Sachs bankier”
Is there a way to keep the content enclosed by (content enclosing)
shortcode tags in the excerpt?
Using Wp 5.4 PHP 7.4 Theme Twenty-twenty (and Blocksy, Astra)
Imho I don’t see why you would want to loose your content (in enclosing
shortcode tags) once an excerpt is created containing that content
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49877>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list