output buffering insert double quotes around the picture tag. How to fix this.
I have htmlToBeInserted.html
file with contents :
<noscript><picture class="slider2pict remJs" own-display="inline-block" >
<source media="(min-width: 320px)" srcset="https://typejoy.biz/exm/book/book170722/public/img/imgSlider/red366sel/0_0_IMG_20170418_112243_M320.webp" type="image/webp" comment="actually code is longer" /> </picture></noscript><img src="https://typejoy.biz/exm/book/book170722/public/img/testJpg.jpg" comment="actually code is longer" />
I insert this file to output.php
ob_start();
include ( $v['filename'] );
$imgStr = ob_get_contents();
ob_end_clean();
echo $imgStr;
The result contains extra quote marks around picture element, thus picture is understood as a piece of text instead of normal html. How it may happen?
<noscript>"<picture .... </picture>"</noscript><img .... />