Safe HTML

If an HTML block contains broken HTML or faulty JavaScript, it could break a page or if in a gloabl area even break an entire site!

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.

For a cleaner way to add JavaScript to a site, Script Output is recommended.

This Safe template for the HTML block is not designed for showing code samples. If that is your requirement, see Syntax Anywhere.