WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#29526 closed defect (bug) (fixed)

wpviews: embedURL: double paragraphs

Reported by: iseulde Owned by: azaozz
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.0
Component: TinyMCE Keywords: has-patch
Focuses: javascript Cc:

Description

The view "text" for embedURL views includes paragraphs and when view are post processed, the view "text" is wrapped in a paragraph before replacing the view with it. Result: <p><p>http://...</p></p>. This is then undone by switchEditors.pre_wpautop. To see it for yourself, compare tinyMCE.activeEditor.getContent(); and window.switchEditors.pre_wpautop( tinyMCE.activeEditor.getContent() );. To reproduce you shouldn't paste the url in *visual* editor, because then the "text" will be just the URL. Instead, paste it in the text editor or save the post.

The view "text" should be the URL without anything around it.

Attachments (1)

29526.patch (763 bytes) - added by iseulde 7 years ago.

Download all attachments as: .zip

Change History (5)

#1 @Viper007Bond
7 years ago

  • Component changed from Embeds to Editor

#2 @iseulde
7 years ago

  • Component changed from Editor to TinyMCE

@iseulde
7 years ago

#3 @iseulde
7 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 4.2

#4 @azaozz
7 years ago

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

In 31485:

TinyMCE wpView: don't insert nested paragraphs when inserting embeddable URLs. Props iseulde, fixes #29526.

Note: See TracTickets for help on using tickets.