[wp-trac] [WordPress Trac] #58366: Shortcode Support Regained but Content Filters are messing with Shortcode HTML
WordPress Trac
noreply at wordpress.org
Mon May 22 15:15:42 UTC 2023
#58366: Shortcode Support Regained but Content Filters are messing with Shortcode
HTML
---------------------------+------------------------------
Reporter: domainsupport | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: 6.2.2
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+------------------------------
Comment (by domainsupport):
Replying to [comment:18 jim5471]:
> OK - just found one difference between the example we have been looking
at and the way I have coded my shortcodes.
{{{#!php
<?php
function do_xxx() {
$html = "<!-- wp:html --><textarea>Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.</textarea><!-- /wp:html -->";
return $html;
}
add_shortcode('xxx', 'do_xxx');
}}}
Returns this...
{{{#!php
<p><textarea>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
ut aliquip ex ea commodo consequat.</p>
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore eu fugiat nulla pariatur.</p>
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.</textarea></p>
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58366#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list