最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

iframe anchor tag url opening in a new page with blank content - Stack Overflow

programmeradmin2浏览0评论

I have an iframe with an anchor tag inside of it

<iframe class="active" scrolling="no" src="{bodyUrl}" sandbox="allow-top-navigation allow-same-origin allow-forms allow-popups"><a data-fr-linked="true" href="; id="isPasted" target="_blank">Navigate</a></iframe>

My issue is that a user upon following this url, a new tab opens, but the new tab page remains white, blank.

In Chrome i get this error

Blocked script execution in '' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

Now I know for a fact if I add allow-scripts to the sandbox property the page will load, but I need an alternative way which would allow a user's interaction following the url to allow that page to open?

I know if I

Correct me if I'm wrong. The new page has scripts attached to it and even though we open a new window from the iframe, the sandbox property still applies? That's why we see the error?

The issue is I don't have access to the new page's source code.

发布评论

评论列表(0)

  1. 暂无评论