WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#29592 closed defect (bug) (fixed)

Image captions break when wpautop is disabled in the editor

Reported by: azaozz Owned by: azaozz
Milestone: 4.0.1 Priority: normal
Severity: normal Version: 4.0
Component: TinyMCE Keywords: fixed-major
Focuses: Cc:

Description

By default wpautop is enabled in TinyMCE but can be turned off when using wp_editor(). This stops running the JS pre_wpautop() on saving the post content and enables some basic HTML source formatting.

This breaks the regexp that converts the <div><dl>...</dl></div> back to a caption shortcode.

Attachments (1)

29592.patch (1.2 KB) - added by azaozz 6 years ago.

Download all attachments as: .zip

Change History (6)

#1 @azaozz
6 years ago

Seems this is not a regression on 4.0 but rather a change in the latest TinyMCE. So

<div><dl>
...
</dl></div>

turns into

<div>
<dl>
...
</dl>
</div>

@azaozz
6 years ago

#2 @azaozz
6 years ago

  • Keywords has-patch commit added

In 29592.patch:

  • Grab white space around the <dl> tag when converting it to image caption shortcode.
  • Relax the test for broken shortcodes.

#3 @azaozz
6 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 29730:

TinyMCE: fix image captions regexp when wpautop is disabled in wp_editor(). Fixes #29592 for trunk.

#4 @azaozz
6 years ago

  • Keywords fixed-major added; has-patch commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for 4.0.1.

#5 @nacin
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 30406:

TinyMCE: fix image captions regexp when wpautop is disabled in wp_editor().

Merges [29730] to the 4.0 branch.

props azaozz.
fixes #29592.

Note: See TracTickets for help on using tickets.