Prevent validation error for WordPress.tv embed in Classic Editor#4164
Merged
westonruter merged 1 commit intodevelopfrom Jan 22, 2020
Merged
Prevent validation error for WordPress.tv embed in Classic Editor#4164westonruter merged 1 commit intodevelopfrom
westonruter merged 1 commit intodevelopfrom
Conversation
As Weston pointed out, it's still possible to have this embed in the classic editor.
westonruter
approved these changes
Jan 22, 2020
Contributor
Author
|
Thanks, sorry for not removing the [WIP] after you mentioned this. |
westonruter
pushed a commit
that referenced
this pull request
Jan 22, 2020
…4164) As Weston pointed out, it's still possible to have this embed in the classic editor.
westonruter
added a commit
that referenced
this pull request
Jan 24, 2020
…ued-dependency-sourcing * 'develop' of github.com:ampproject/amp-wp: (42 commits) Use static closure since $this is not needed Revert change in some tests, as they're not needed anymore Use suggested normalization, update tests Add a new method to normalize URLs Remove test case that is no longer handled Move urldecode() lower in the function Revert change to regex, in favor of trimming before it's passed Fix some phpcs errors, mainly => alignment Align => operators, from a recent commit Add a since tag to the new filter amp_to_amp_excluded_urls Commit Weston's suggestion to prevent conditional in Standard mode Handle case of something like #heading at end of URL Rename parameter 'excluded_amp_links' to 'excluded_urls' Change filter name to 'amp_to_amp_excluded_urls' Change DocBlock of 'amp_to_amp_excluded_links' As there's now a capturing group, remove lookahead Replace 2 calls of trim() with longer regex in parse_protocol() Commit Weston's suggestion for the Reader mode template Allow a URL to have a leading space without a validation error For WordPress.tv embed, Use an oembed filter instead of block filter (#4164) ...
westonruter
added a commit
that referenced
this pull request
Feb 13, 2020
* tag '1.4.3': (22 commits) Update readme and screenshots for Stories removal (#4259) Open story export instructions in a new window (#4258) Bump version to 1.4.3-RC1 Hide Stories options and add deprecation notice (#4219) Fix malformed conversion of relative action URLs for forms (#4250) Limit Stories experience to WP 5.3 & Gutenberg 7.1.0 (#4217) Prevent errors in admin bar filters from non-array arguments (#4207) Update @wordpress/e2e-test-utils dependency Revert update of mustache/mustache dependency Update composer.lock Update WP CLI to 2.4.0 For WordPress.tv embed, Use an oembed filter instead of block filter (#4164) Update readme to add FAQs section (#4159) Apply workaround to fix test__multiple_valid_image_files (#4034) Ignore Story editor tests (#4043) Update amp-video embed regex pattern to include other Vimeo URL formats (#4051) Update amp-instagram embed regex (#4053) Update wp-dev-lib package (#4029) Fix conversion of forms with relative action URLs (#4003) Improve release instructions (#3995) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In the classic editor, this prevents a validation error from a
<script>appearing in the WordPress.tv oEmbed markup.As Weston mentioned, the previous
'render_block'filter only applied to the WordPress.tv block.But this embed can be in the Classic Editor, or in a Custom HTML block in the block editor.
This uses the suggested
'embed_oembed_html'filter instead, which handles these cases without a validation error:Classic Editor
Block Editor
Fixes #4130
Checklist