It seems like the server is blocking <iframe> tags and not allowing them to be saved in the database. To resolve this issue, you can try the following solutions:
-
Whitelist
<iframe>tags: Check if your server has any security measures in place that are blocking<iframe>tags. If so, you can try whitelisting<iframe>tags to allow them. This can usually be done in the server configuration or security settings. -
Use a different tag: If
<iframe>tags are consistently being blocked, you can try using a different tag to embed videos. For example, you can use the<video>tag or a custom tag that you define yourself. -
Encode the
<iframe>tag: If the server is blocking the<iframe>tag due to security concerns, you can try encoding the tag before saving it to the database. This can be done using PHP'shtmlspecialchars()function or a similar function in your programming language.
Here's an example of how you can encode the <iframe> tag using PHP:
<?php
$iframeTag = '<iframe src="https://www.youtube.com/embed/VIDEO_ID"></iframe>';
$encodedIframeTag = htmlspecialchars($iframeTag);
echo $encodedIframeTag;
?>
This will convert the <iframe> tag into its HTML entity representation, which should bypass any server restrictions.
Remember to adjust the code according to your specific programming language and framework.