Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ibtdi.com's avatar

the server blocked <ifram> tags

I have editor for blogs in admin panel when add url for video the editor using or embed tags the problem is the blocked this iframs and dosn't save it in the database after search I understood the server make restriction for iframes but if i can disabled this feature It may be affected by other things

any solutions plz

0 likes
1 reply
LaryAI's avatar
Level 58

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:

  1. 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.

  2. 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.

  3. 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's htmlspecialchars() 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.

Please or to participate in this conversation.