Edgewall Software

Changes between Initial Version and Version 1 of Ticket #123

Show
Ignore:
Timestamp:
06/05/07 20:45:06 (7 years ago)
Author:
cmlenz
Comment:

Hmm, how about allow_exec=True instead of disable_python=False? Or maybe allow_code_blocks=True, but that's too long IMHO.

The name disable_python is misleading as expressions are also Python.

(I've modified the description to improve readability/formatting)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #123 – description

    initial v1  
    11Hi, 
    22 
    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, 
     3We'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 
     5I'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 
     7Are there any chances that this can be included in Genshi, in this or some other form? 
     8 
     9Thanks, 
    710 
    811  f.-