[Petal] control over encoding

Benjamin Tucker ben at greenriver.org
Thu Jul 27 17:19:52 BST 2006


On Jul 27, 2006, at 10:30 AM, Jonathan Vanasco wrote:

>
> On Jul 27, 2006, at 2:37 AM, Benjamin Tucker wrote:
>
>> Will this break anything?  is Petal::Hash::Var::process ever  
>> accessed without going through Petal::Hash::get_encoded?  Does  
>> anyone have a suggestion of a better solution?
>
> Teach your people to use 'structure' when they want HTML and not  
> when they don't-- because that distinction is in the TAL  
> specification, which means your hack is Petal specific, and your  
> templates worthless with any other implementatino

Of course it's petal specific, as is the backend API which I'm  
exposing to the templates and the Petal path expression parsing  
code.  These methods will always return html which should not be  
encoded.  Why force redundancy?  I'm not advocating this hack be  
included with the Petal distribution, I was just looking for advice  
on whether this would break something I'm not aware of, or if there's  
a better (read: equally DRY) valid way to do it.

Thanks,
Ben


More information about the Petal mailing list