Documentation

IMPORTANT

If you are considering doing something dangerous with an HTML block:

  1. add a block with minimal content just to mark its place, 
  2. assign this template, 
  3. edit the block again to add the dangerous content.

You need to assign this template before adding dangerous content to an HTML block. Once the dangerous content is saved, it could be too late!

By assigning the Safe block template, the HTML is escaped in edit mode. As long as you can get into edit mode, you can edit the broken block.

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.

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

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

See more addons by JohntheFish.