1

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 ....  />
Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
olga
  • 959
  • 1
  • 15
  • 42

1 Answers1

0

Seems this is default Google Chrome behavior, in case java-script is enabled, everything inside no-script tag is double quoted. If i disable JavaScript in chrome, the double quotes disappear.

olga
  • 959
  • 1
  • 15
  • 42