Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ale-rt opened this issue Mar 28, 2023 · 1 comment

Comments

@ale-rt
Copy link
Member

ale-rt commented Mar 28, 2023

          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)

@petschki
Copy link
Member

We were bitten by this too in an addon. I've created an issue. see malthe/chameleon#429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants