Optional disable python code blocks patch
|Reported by:||fschwindt@…||Owned by:||cmlenz|
|Keywords:||python code block patch||Cc:|
Description (last modified by cmlenz)
We're starting to use Genshi at work and we'd like to have a switch to disable python code blocks to avoid any possible misuse and abuse from the content editors.
I've attached the diff (including unittest). It's fairly simple. Passing True to python_disable (yuk, I couldn't think of any other name for it) will raise a TemplateSyntaxError if it encounters such blocks, otherwise the behaviour is the same as the current one.
Are there any chances that this can be included in Genshi, in this or some other form?