Hard to undo when .ContentSecurityPolicy is invalid

In case you edit the contents of a .ContentSecurityPolicy file, you will get an error and the toolbar will not be shown. Even if you are in the IDE, you won't be able to save any more, nor undo. You will have to go to the Control Panel, find the branch, find the undo/redo functionality there and press undo. Then you can edit the .ContentSecurityPolicy file again. This should be simplified. Either test the .ContentSecurityPolicy rules before saving the file, or keep the ability to undo the change.