[wp-trac] [WordPress Trac] #40257: TinyMCE wpview: oEnbed previews are not shown if there is only a single line break before the URL
WordPress Trac
noreply at wordpress.org
Sat Mar 25 01:58:28 UTC 2017
#40257: TinyMCE wpview: oEnbed previews are not shown if there is only a single
line break before the URL
--------------------------+----------------------------
Reporter: azaozz | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: TinyMCE | Version: 4.4
Severity: normal | Keywords: needs-patch
Focuses: |
--------------------------+----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40257>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list