Make WordPress Core

Opened 12 years ago

Closed 9 years ago

#22272 closed defect (bug) (duplicate)

shortcode_unautop() Doesn't Account for Opening/Closing Shortcode tags each Being on Their Own Line

Reported by: bonnerl's profile bonnerl Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.2
Component: Shortcodes Keywords:
Focuses: Cc:

Description

The shortcode_unautop function does not appear to account for when the opening and closing shortcode tags are put on separate lines from the paragraph they are surrounding.

For example: the following is after wpautop() adds the paragraph tags.

<p>[cool_shortcode]</p>
<p>A paragraph about something you should know.</p><p>[/cool_shortcode]</p>

I would expect that shortcode_unautop would remove the paragraph tags from around both the opening and the closing shortcode tags. Instead it treats it all as if the entire thing were in one paragraph. Resulting in the following code being output.

[cool_shortcode]</p>
<p>A paragraph about something you should know.</p><p>[/cool_shortcode]

Change History (3)

#1 follow-up: @lkraav
11 years ago

  • Cc leho@… added

We're talking about the same or very similar thing in #24085. This is still creating broken HTML in 3.7.1.

#2 in reply to: ↑ 1 @aaroncampbell
10 years ago

Replying to lkraav:

We're talking about the same or very similar thing in #24085. This is still creating broken HTML in 3.7.1.

And I think both are related to or duplicates of #14050

#3 @miqrogroove
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #24085.

Note: See TracTickets for help on using tickets.