[wp-trac] [WordPress Trac] #44632: Properly enqueue wp-embed
WordPress Trac
noreply at wordpress.org
Sat Nov 13 07:27:06 UTC 2021
#44632: Properly enqueue wp-embed
-------------------------------------+-------------------------------------
Reporter: alpipego | Owner: westonruter
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.9
Component: Embeds | Version: 4.4
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit- | Focuses: javascript,
tests | performance
-------------------------------------+-------------------------------------
Changes (by westonruter):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"52153" 52153]:
{{{
#!CommitTicketReference repository="" revision="52153"
Embeds: Fix parsing of post embeds in `wp_filter_oembed_result()` by
appending `wp-embed` script instead of prepending it in
`get_post_embed_html()`.
Due to the way that the `blockquote` and `iframe` are being parsed with a
regular expression in `wp_filter_oembed_result()`, if there is any content
at all before the `blockquote` start tag then it will fail to be included
in the first matching group. By appending the `wp-embed` script instead of
prepending it in `get_post_embed_html()`, then the parsing issue is
avoided.
Also use non-greedy match `wp_maybe_enqueue_oembed_host_js()`.
Amends [52132].
Fixes #44632.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44632#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list