Loading core/modules/media/src/Controller/OEmbedIframeController.php +3 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,9 @@ public function render(Request $request) { // Return a response instead of a render array so that the frame content // will not have all the blocks and page elements normally rendered by // Drupal. $response = new HtmlResponse(); $response = new HtmlResponse('', HtmlResponse::HTTP_OK, [ 'Content-Type' => 'text/html; charset=UTF-8', ]); $response->addCacheableDependency(Url::createFromRequest($request)); try { Loading core/modules/media/tests/src/Kernel/OEmbedIframeControllerTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,7 @@ public function testResourcePassedToPreprocess() { $this->assertStringContainsString('&pasta=rigatoni', $content); $this->assertStringContainsString('test.css', $content); $this->assertContains('yo_there', $response->getCacheableMetadata()->getCacheTags()); $this->assertStringContainsString('text/html', $response->headers->get('Content-Type')); } } Loading
core/modules/media/src/Controller/OEmbedIframeController.php +3 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,9 @@ public function render(Request $request) { // Return a response instead of a render array so that the frame content // will not have all the blocks and page elements normally rendered by // Drupal. $response = new HtmlResponse(); $response = new HtmlResponse('', HtmlResponse::HTTP_OK, [ 'Content-Type' => 'text/html; charset=UTF-8', ]); $response->addCacheableDependency(Url::createFromRequest($request)); try { Loading
core/modules/media/tests/src/Kernel/OEmbedIframeControllerTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,7 @@ public function testResourcePassedToPreprocess() { $this->assertStringContainsString('&pasta=rigatoni', $content); $this->assertStringContainsString('test.css', $content); $this->assertContains('yo_there', $response->getCacheableMetadata()->getCacheTags()); $this->assertStringContainsString('text/html', $response->headers->get('Content-Type')); } }