WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 15 months ago

#40257 closed defect (bug) (wontfix)

TinyMCE wpview: oEmbed previews are not shown if there is only a single line break before the URL

Reported by: azaozz Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: TinyMCE Keywords:
Focuses: Cc:

Description

Follow up from Slack: https://wordpress.slack.com/archives/C02QB2JS7/p1490366664439760.

When "embeddable" URLs are separated by only one line break, they work properly in PHP on the front-end but not in wpview in the editor.

To reproduce paste the following in the Text editor then preview the post:

https://www.youtube.com/watch?v=3_uj1kedrNk
https://videopress.com/v/zfu4XFD5

It works properly in the preview / on the front-end, but no instances of wpview are created when switching to the Visual editor.

Happens because the PHP version of the regex that finds these URLs is quite different than the JS version. We should standardize it to the PHP version even if that introduces minor regressions (i.e. we show a preview for something that we didn't before), as the "true" functionality is on the front-end, wpview is just previews.

Change History (2)

#1 @SergeyBiryukov
4 years ago

  • Summary changed from TinyMCE wpview: oEnbed previews are not shown if there is only a single line break before the URL to TinyMCE wpview: oEmbed previews are not shown if there is only a single line break before the URL

#2 @azaozz
15 months ago

  • Keywords needs-patch removed
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This is now superseded by the block editor. All embeds work much better there.

Note: See TracTickets for help on using tickets.