I'm building a web application where the user can supply a bit of his own html and it should be inserted into one of the page's div elements. My only concern is if the user supplies some really awful code. How do I 'sandbox' his html code so that, if it really is that bad, it won't derail the rest of the page's layout?
With an <iframe sandbox="">. There isn't really any other reliable way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With