WordPress.org

Make WordPress Core

Opened 22 months ago

Last modified 16 months ago

#24846 reopened defect (bug)

Usage of a shortcode disables wpautop filter

Reported by: Looimaster Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.6
Component: Formatting Keywords: wpautop
Focuses: Cc:

Description

In WP3.6 RC1 when I do this:

Some text. Some text. Some text. Some text. Some text. Some text. Some text.

it works just fine. It creates a paragraph.

But when I do this (both in "Visual" and "Text" editors):

[symple_highlight color="gray"]Some text[/symple_highlight]. Some text. Some text. Some text. Some text. Some text. Some text.

it doesn't wrap the text in anything. Paragraph is skipped.

The plugin that was used: http://www.wpexplorer.com/symple-shortcodes/ (but I bet it isn't plugin's bug).

Change History (8)

comment:1 @aaronholbrook22 months ago

  • Resolution set to invalid
  • Status changed from new to closed

Tested against trunk rev 24833 using simple custom shortcode as demonstrated on codex (http://codex.wordpress.org/Shortcode_API).

Shortcode did not disable or interrupt wpautop filter from working correctly.

Closing as invalid, most likely this is an issue with the Looimaster's Symple Shortcodes plugin.

comment:2 @ocean9022 months ago

  • Milestone Awaiting Review deleted

Sadly the plugin is only available for members. There isn't much we can do here.

comment:3 @Looimaster22 months ago

Here's the shortcode:

function symple_highlight_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
		'color' => 'yellow',
		'class' => '',
	  ),
	  $atts ) );
	  return '<span class="symple-highlight symple-highlight-'. $color .' '. $class .'">' . do_shortcode( $content ) . '</span>';

}
add_shortcode('symple_highlight', 'symple_highlight_shortcode');

This creates a paragraph:

Some text. Some text. Some text. Some text. Some text. Some text. Some text.

This creates a paragraph:

Some text. Some text. Some text. [symple_highlight color="gray"]Some text[/symple_highlight]. Some text. Some text. Some text.

This doesn't create a paragraph:

[symple_highlight color="gray"]Some text[/symple_highlight]. Some text. Some text. Some text. Some text. Some text. Some text.

Please note that paragraph is actually created, but after the text:

http://gyazo.com/4c43312ad0ad083be4cc7ffe55df14c5.png

comment:4 @Looimaster22 months ago

  • Resolution invalid deleted
  • Status changed from closed to reopened
Version 0, edited 22 months ago by Looimaster (next)

comment:5 @dd3222 months ago

  • Milestone set to Awaiting Review

comment:6 @TobiasBg22 months ago

Looimaster: Instead of investigating the output in the Chrome Dev Tools, what does it say in the real HTML source of the page?

comment:7 @Looimaster22 months ago

Real source:

<span class="symple-highlight symple-highlight-green ">Test text</span> test text test text test text.</p>

Closing </p> is there but there it no opening <p>.

comment:8 @nacin16 months ago

  • Component changed from General to Formatting
  • Keywords wpautop added
Note: See TracTickets for help on using tickets.