StackOverflow's editor seem to have changed, or to be more precise, the settings for the snippet editor that allow to run code in questions/answers have changed. The snippets are now executed in a sandbox mode that doesn't allow the submission of forms (something that was possible before), receiving the following message in Chrome:

Blocked form submission to '' because the form's frame is sandboxed and the 'allow-forms' permission is not set.

This affects all the snippets that use the submit event in forms (even the ones in which preventDefault prevents submission) and they have stopped working. Example of an answer in StackOverflow in Spanish affected by this.

Is this a known issue? What should we do with the posts that are affected by this?


I just added the allow-forms token to the snippet's iframe's sandbox attribute, so submission is now possible:

<form action="https://httpbin.org/post" method="post">
  <input type="submit" value="submit"/>

Since we already allow your arbitrary script, allowing form submission didn't seem to add any new capabilities that would cause more security concerns.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .