tal:attributes inserts attribute with empty value when '' is given

Bug #664914 reported by Ross Patterson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Chamelon Core
Won't Fix
Undecided
Unassigned

Bug Description

When doing, for example, <option tal:attributes="selected ''" />, the resulting element will be <option selected="" />. The reference implementation in zope.pagetemplate will omit the element in this case, <option />.

Revision history for this message
Ross Patterson (rossp) wrote :

I've attached a patch that adds test coverage exposing this bug.

description: updated
description: updated
Revision history for this message
Malthe Borch (mborch) wrote :

I'm not sure about this one; what's stopping you from changing it to "selected nothing"?

Legacy compatibility is important, but I don't like very much these HTML-specific rules because it's not clear what happens.

Revision history for this message
Ross Patterson (rossp) wrote :

I kinda agree, feel free to reject, at least this is here for history and reference by others.

Malthe Borch (mborch)
Changed in chameleon.core:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.