-
Notifications
You must be signed in to change notification settings - Fork 64
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
Bug in rendering tal:attributes in case of boolean values? #318
Comments
You need to configure For an example, see https://github.com/zopefoundation/z3c.pt/blob/master/src/z3c/pt/pagetemplate.py#L40. |
* - new branch to fix TAL default handling * adapt to changed default handling of `chameleon==3.7.4` (does not yet work * Python 3 compatibility * - use Chameleon 3.8 * Adaptations for `chameleon>=3.8` * - fix lint issue * - add test for straight boolean after seeing malthe/chameleon#318 * - comment change [ci skip] Co-authored-by: dieter <dieter@handshake.de>
* - new branch to fix TAL default handling * adapt to changed default handling of `chameleon==3.7.4` (does not yet work * Python 3 compatibility * - use Chameleon 3.8 * Adaptations for `chameleon>=3.8` * - fix lint issue * - add test for straight boolean after seeing malthe/chameleon#318 * - comment change [ci skip] Co-authored-by: dieter <dieter@handshake.de>
@DadaDaMotha I confirm the same behavior. Chameleon 3.7.4 does not exhibit this behavior. I have pinned my dependencies to In Deform, all CheckboxChoiceWidgets (and probably other checkbox widgets) render a I'll follow up after I deal with the fire drill this change caused. |
@stevepiercy let me know how you fare – it should be relatively straight-forward to get those |
Ha, you assume I know what I'm doing! 😬 I honestly don't know whether to look first in Deform or pyramid_chameleon. I spend more time staring blankly at the code and drooling than understanding it. Ah, well, no time like the present to start learning. |
My first guess was to scan for any imports of |
Our issues were fixed by Pylons/deform#418 |
Superb!
…On Sun, 28 Jun 2020 at 03.38, Steve Piercy ***@***.***> wrote:
Our issues were fixed by Pylons/deform#418
<Pylons/deform#418>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#318 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAGOJMYH34DSF6VKPZF4JDRY2NLDANCNFSM4OJFFBQA>
.
|
Dear maintainers,
page will yield |
I am not sure I understand. What is the expected output? |
Hi malthe, thx for your reply. I would expect |
[Edit: our replies crossed.] The comment in
So I think he expects this as output:
I think the generated html is fine, at least better than what it was according to the original issue comment, especially when it could be |
I think the comment is a misinterpretation of the W3 specification.
The link should be https://www.w3.org/TR/xhtml1/#C_10, which is quoted below.
In other words, it is perfectly OK, and actually better to use, the full form, such as |
Okay, now I understand and true, I was mislead by that comment. Thanks very much for the clarifications. |
@malthe @mauritsvanrees should I submit a PR to update that comment? I think its current state is a misinterpretation of the specification. |
@stevepiercy yeah I think that would be helpful. Thanks! |
This PR updates the comment on boolean HTML attributes to accurately reflect the intent of the XHTML 1.0 specification. See malthe/chameleon#318 (comment)
We discovered a changement in rendering of boolean attributes in the option tag since release 3.8.0 (using python 3.8).
Example:
<select> <option value="" tal:attributes="selected True">Selected</option> <option value="a" tal:attributes="selected False">Not selected</option> <option value="ok" tal:attributes="selected None">OK</option> </select>
will render to:
<select> <option value="" selected="True">Selected</option> <option value="a" selected="False">Not selected</option> <option value="ok">OK</option> </select>
Can somebody confirm this?
The workaround for now would be to pin down the version to 3.7.4.
The text was updated successfully, but these errors were encountered: