Title: Adding Sandbox attribute (how?)
Last modified: April 16, 2021

---

# Adding Sandbox attribute (how?)

 *  Resolved [homerecords](https://wordpress.org/support/users/homerecords/)
 * (@homerecords)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/adding-sandbox-attribute-how/)
 * Hello Yannick,
 * I was wondering if and how I could add a sandbox attribute to your script.
 * I ask this because I would like to add a external webpage with script to the 
   dialog.
    This initialy works fine but due to the external script it causes problem
   with the navigation menu (browsing the navigation menu) and with the back and
   forward button of several browsers like Chrome and Edge..
 * Now I know that when I use that website script inside an iframe I can resolve
   the issue by adding the Sandbox attribute with certain values.
 * But how do I add that attribute ( or something similar) to your plugin configuration?
 * If you would like to know more or an example I will set it up on a test website.
 * Thanks in advance and kind regards,
 * Ed.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/adding-sandbox-attribute-how/#post-14329709)
 * Hi there, I’ve checked and none of the two pop-up dialog libraries that Modal
   Dialog supports offers an option to set the sandbox attribute on the iframe that
   they create. Doing a quick online search, I did not find any potential candidates
   to add to Modal Dialog that would offer such functionality.
 *  Thread Starter [homerecords](https://wordpress.org/support/users/homerecords/)
 * (@homerecords)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/adding-sandbox-attribute-how/#post-14329987)
 * Thanks for your reply Yannick!
 * I have been looking into the code (in colorbox & fancybox too) as well and tried
   a few things but didn’t work, as you mentioned.
 * But for now a solved my issue by adding the sandbox attribute into some html 
   code and that I put in the text area (Dialog Contents) instead of adding the 
   URL to the website address field.
 * Like this
 *     ```
        html formatted text text
       <iframe src="https://website.ext" sandbox="allow-scripts allow-forms allow-same-origin" width="800" height="600" frameborder="3"> </iframe>
       some more html formatted text 
       ```
   
 * Works fine now but it’s just that it’s an iframe inside an iframe now.
 * But it works.
 * Thanks again and have a nice day.
 * Ed.
    -  This reply was modified 5 years, 1 month ago by [homerecords](https://wordpress.org/support/users/homerecords/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding Sandbox attribute (how?)’ is closed to new replies.

 * ![](https://ps.w.org/modal-dialog/assets/icon-256x256.jpg?rev=971132)
 * [Modal Dialog](https://wordpress.org/plugins/modal-dialog/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/modal-dialog/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/modal-dialog/)
 * [Active Topics](https://wordpress.org/support/plugin/modal-dialog/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/modal-dialog/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/modal-dialog/reviews/)

## Tags

 * [attributes](https://wordpress.org/support/topic-tag/attributes/)
 * [iframe](https://wordpress.org/support/topic-tag/iframe/)

 * 2 replies
 * 2 participants
 * Last reply from: [homerecords](https://wordpress.org/support/users/homerecords/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/adding-sandbox-attribute-how/#post-14329987)
 * Status: resolved