Skip to content

Commit

Permalink
Update hostname used for WordPress TV embeds to fix external HTTP req…
Browse files Browse the repository at this point in the history
…uests (#4524)
  • Loading branch information
westonruter committed Apr 3, 2020
1 parent c89c752 commit a2104ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/php/test-class-amp-wordpress-tv-embed-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function mock_http_request( $preempt, $r, $url ) {
}
unset( $r );
return [
'body' => '{"type":"video","version":"1.0","title":null,"width":500,"height":281,"html":"<iframe width=\'500\' height=\'281\' src=\'https:\\/\\/videopress.com\\/embed\\/yFCmLMGL?hd=0\' frameborder=\'0\' allowfullscreen><\\/iframe><script src=\'https:\\/\\/v0.wordpress.com\\/js\\/next\\/videopress-iframe.js?m=1435166243\'></script>"}', // phpcs:ignore
'body' => '{"type":"video","version":"1.0","title":null,"width":500,"height":281,"html":"<iframe width=\'500\' height=\'281\' src=\'https:\\/\\/video.wordpress.com\\/embed\\/yFCmLMGL?hd=0\' frameborder=\'0\' allowfullscreen><\\/iframe><script src=\'https:\\/\\/v0.wordpress.com\\/js\\/next\\/videopress-iframe.js?m=1435166243\'></script>"}', // phpcs:ignore
'headers' => [],
'response' => [
'code' => 200,
Expand Down Expand Up @@ -77,7 +77,7 @@ public function test_script_removal() {
$handler->register_embed();
$rendered = apply_filters( 'the_content', $wordpress_tv_block );
$this->assertStringContains( '<iframe', $rendered );
$this->assertStringContains( 'videopress.com/embed', $rendered );
$this->assertStringContains( 'video.wordpress.com/embed', $rendered );
$this->assertStringNotContains( '<script', $rendered );
}

Expand Down

0 comments on commit a2104ce

Please sign in to comment.