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. In this case, the plugin will not even try to escape code, because ALL HTML special characters will already be escaped systematically.
Note: this plugin is currently under development and exact specs may still change.