Jump to content

Recommended Posts

Posted

Hello. I would appreciate if someone can provide some help with this.

When i use the rest api to submit a database record/article I include media like images, video (youtube iframe embed). Now with youtube iframes what happens is that sometimes the video ids get cut, so I end up with an thml like this. Yu will notice that only 3 characters are preserved and the rest somehow get removed during the rest submission. This happens 50% of the time. Thank you.

 

<div class="ipsEmbeddedVideo" contenteditable="false">
	<div>
		<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="" frameborder="0" height="113" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/Hau" width="200"></iframe>
	</div>
</div>

 

  • Solution
Posted

Are you encoding the characters of your body parameters correctly so that they are passed as desired?

Posted

Thank you. No, actually for the video id part I did not do that. I will try something like this and see if it helps. Thank you.

$zvideo_id = htmlspecialchars($zvideo_id, ENT_QUOTES, 'UTF-8');

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...