I have following code in my CustomVideoBlock.php file
foreach ($video_result as $video){ $title = $video->title; $video_body = $video->body_value; } $video_data = filter_var($video_body, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
The $video_data hold this kind of value
<div ="" ="https://schema.org/VideoObject"><meta ="uploadDate" content="Fri Jan 21 2022 15:15:46 GMT-0600 (Central Standard Time)"><meta ="name" content="Laredo Economic Development"><meta ="duration" content="P0Y0M0DT0H2M59S"><meta ="thumbnailUrl" content="https://cdn.jwplayer.com/thumbs/vbnSJqwQ-720.jpg"><meta ="contentUrl" content="https://content.jwplatform.com/videos/vbnSJqwQ-ja6y4YQJ.m4a"></div>
And i am returning below to the twig template file(video-block).
$renderable = [ '#theme' => 'video-block', '#title' => $title, '#description' => $video_data ]; return $renderable;
In the twig file i am rendering the variables.
<h6>Title {{ title }}</h6> {{ description | raw}}
But i am getting the whole html body on browser in double quotes. My requirement is to render the video on browser. Where i am doing wrong ?