3 | | 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. |
4 | | 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. |
5 | | Are there any chances that this can be included in Genshi, in this or some other form? |
6 | | Thanks, |
| 3 | 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. |
| 4 | |
| 5 | 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. |
| 6 | |
| 7 | Are there any chances that this can be included in Genshi, in this or some other form? |
| 8 | |
| 9 | Thanks, |