This renderer plugin escapes code enclosed in
[codeblock] as well as MarkDown code blocks.
This allows to include code blocks even in collections that accept HTML format.
However, for this to work, you will have to edit posts containing code in HTML mode and not in WYSIWYG mode. (If you want to use WYSIWYG mode, don't try to use codespan or codeblock markers.)
Note: you don't need this if your collection does not accept HTML format anyways.
Note: this plugin is currently under development and exact specs may still change.