[wp-trac] [WordPress Trac] #45142: Filter HTML response in oEmbed proxy controller
WordPress Trac
noreply at wordpress.org
Tue Oct 23 12:58:43 UTC 2018
#45142: Filter HTML response in oEmbed proxy controller
---------------------------------------------------+-----------------------
Reporter: swissspidy | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: Embeds | Version:
Severity: normal | Resolution:
Keywords: has-patch dev-feedback has-unit-tests | Focuses: rest-api
---------------------------------------------------+-----------------------
Changes (by danielbachhuber):
* keywords: has-patch dev-feedback needs-testing needs-unit-tests => has-
patch dev-feedback has-unit-tests
Comment:
Replying to [comment:8 swissspidy]:
> As for the patch, I tried to add some tests in
[attachment:"45142.2.diff"], but since it's already late here I couldn't
make the last test work that should verify the newly added `oembed_result`
filter in the proxy endpoint.
@swissspidy I'm not quite sure what you mean by this because
[attachment:"45142.2.diff"] included:
{{{
$this->markTestIncomplete( 'Need to test that the resulting HTML is passed
through the oembed_dataparse filter' );
}}}
Note: `oembed_dataparse` instead of `oembed_result`.
In [attachment:"45142.3.diff"], I've added some assertions around the
expected calls to `oembed_result`. I also fixed the PHPDoc for
`oembed_result`, because `$data` can be false.
Tests running in https://github.com/WordPress/wordpress-develop/pull/26
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45142#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list