Make WordPress Core

Opened 11 years ago

Last modified 5 years ago

#24846 reopened defect (bug)

Usage of a shortcode disables wpautop filter

Reported by: looimaster's profile Looimaster Owned by:
Milestone: 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 (9)

#1 @aaronholbrook
11 years 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.

#2 @ocean90
11 years ago

  • Milestone Awaiting Review deleted

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

#3 @Looimaster
11 years 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

#4 @Looimaster
11 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Testing in: 3.7-alpha-24954

Last edited 11 years ago by Looimaster (previous) (diff)

#5 @dd32
11 years ago

  • Milestone set to Awaiting Review

#6 @TobiasBg
11 years ago

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

#7 @Looimaster
11 years 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>.

#8 @nacin
11 years ago

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