clement rakesh n
clement rakesh n

Reputation: 73

Disable script execution within iframe

I have a iframe which contains html. But when the html contains scripts, the iframe executes it. Is there a way to prevent it?

Upvotes: 7

Views: 8338

Answers (1)

Muthukumar Anbalagan
Muthukumar Anbalagan

Reputation: 1178

just enable sandbox is simple way to start with.

<iframe src="http://www.cnn.com" width="600" height="600" sandbox=""></iframe>

http://www.w3schools.com/tags/att_iframe_sandbox.asp

Upvotes: 7

Related Questions