Opened 14 years ago

Closed 14 years ago

#5633 closed defect (fixed)

dojox.dtl._Widget fails to render {% for %} inside <select>

Reported by: guest Owned by: Neil Roberts
Priority: high Milestone:
Component: Dojox Version: 1.0
Keywords: Cc: [email protected]
Blocked By: Blocking:


Firefox RedHat? Enterprise Linux 5 Dojo 1.0.2


Using a Django template for loop inside of a select tag to populate with options fails. Using the same tag inside a ul, ol, p, etc. works fine.

For example, assume my_list is an array of [1,2,3] in the Context object. Then the following works:

  {% for i in my_list %}
  {% endfor %}

but this does not:

  {% for i in my_list %}
  {% endfor %}

In the second case, the loop appears to execute once, but i is undefined when emitted.

Email me if you need more info or can't reproduce.

Change History (2)

comment:1 Changed 14 years ago by Adam Peller

Owner: changed from Adam Peller to Neil Roberts

comment:2 Changed 14 years ago by Neil Roberts

Resolution: fixed
Status: newclosed

(In [12206]) Fixes #5633. !strict

  • Some tags don't allow text nodes as child nodes (the select tag in this case)
  • We make sure text gets wrapped in allowed child nodes with a certain attribute set
  • We then treat these nodes as comments when tokenizing
Note: See TracTickets for help on using tickets.