Skip to content

It seems to me that chameleon does not behave properly with boolean attributes: #123

@ale-rt

Description

@ale-rt
          It seems to me that chameleon does not behave properly with boolean attributes:
[ale@flo chameleon]$ cat test.pt
<input required="" tal:attributes="required string:required">
<input required tal:attributes="required string:required">
<input required foo="bar" tal:attributes="required string:required">

[ale@flo chameleon]$ cat test.py
from chameleon import PageTemplate

with open("test.pt") as f:
    print(PageTemplate(f.read())())

[ale@flo chameleon]$ python test.py 
<input required="required">
<input requiredrequired>
<input requiredrequired foo="bar">

Originally posted by @ale-rt in #119 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions