[wp-trac] [WordPress Trac] #34722: Open P Tag in shortcode related to h tag
WordPress Trac
noreply at wordpress.org
Fri Aug 26 13:46:27 UTC 2016
#34722: Open P Tag in shortcode related to h tag
-------------------------------------+------------------------------
Reporter: BackuPs | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 4.4
Severity: normal | Resolution:
Keywords: close reporter-feedback | Focuses:
-------------------------------------+------------------------------
Changes (by MattyRob):
* keywords: close => close reporter-feedback
Comment:
I found this ticket from a comment at https://make.wordpress.org/core/
Following code in a plugin to register the shortcode:
{{{
function theme_shortcode_div( $atts, $content = null, $code ) {
return '<div class="theme-div">' . $content .'</div>';
}
add_shortcode( 'theme_div', 'theme_shortcode_div' );
}}}
Test on an admin page with the following code inserted into the admin
page:
{{{
$content = "[theme_div]<h3>Integer in ex vel urna tempor ultrices.</h3>
Morbi vehicula a orci nec dignissim.[/theme_div]";
var_dump( do_shortcode( $content ) );
}}}
Made sure to view the source in FF 48.0 (not Firebug which can autocorrect
some malformed HTML, output as follows:
{{{
string(114) "<div class="theme-div"><h3>Integer in ex vel urna tempor
ultrices.</h3> Morbi vehicula a orci nec dignissim.</div>"
}}}
No malformed <p> tags anywhere for me on this testing - could it be a
plugin conflict perhasp as it seems to work as expected for me.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34722#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list