This package provides a simple Safe template for the core HTML block. By assigning the Safe block template, the HTML is escaped in edit mode. So as long as you can get into edit mode, you will always be able to see where the broken block is and and edit it.
If you have trouble getting into the the page to edit it, you can hack a configuration value in the file application/config/generated_overrides/safe_html.php and set 'panic' => true. This will render the safe view no matter what, so you can edit the page and fix your faulty html. Remember to reset 'panic'=>false afterwards.
This is not a complete solution, but does present an option for doing dangerous things in a safer way. See https://c5magic.co.uk/addons/safe-html for details, documentation and problem solving tips and tricks.
This Safe template for the HTML block is not designed for showing code samples. If that is your requirement, see Syntax Anywhere.
See more addons by JohntheFish.