Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
virap1 Posted January 3 Posted January 3 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 Jim M Posted January 3 Solution Posted January 3 Are you encoding the characters of your body parameters correctly so that they are passed as desired?
virap1 Posted January 3 Author Posted January 3 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');
virap1 Posted January 3 Author Posted January 3 Thank you Mark. Encoding was indeed the problem. All good now.
Recommended Posts