Opened 14 years ago

Closed 13 years ago

#7300 closed defect (fixed)

dojox.dtl.HtmlTemplate cannot use arguments in tag attributes

Reported by: Shane O'Sullivan Owned by: Neil Roberts
Priority: high Milestone: 1.3
Component: DojoX DTL Version: 1.1.1
Keywords: DTL Cc: Neil Roberts
Blocked By: Blocking:


If a DTL template contains an argument in a tag attribute, DTL thinks that this is a URL and attempts to download it's contents.

E.g. <div>

{% for item in items %}

<a index="{{forloop.counter0}}" id="id_{{item.param}}">



{% endfor %}


Will break when a new dojox.dtl.HtmlTemplate? is created using this template. If the


is removed, it works.

When using a standard dojox.dtl.Template, the above template works just fine.

Change History (11)

comment:1 Changed 14 years ago by Adam Peller

Owner: changed from Adam Peller to Neil Roberts

comment:2 Changed 13 years ago by Neil Roberts

(In [14789]) Refs #7300. Figured I'd also get in:

  • buffer tag improvements
  • attribute speed improvements
  • context speed improvements
  • !strict

comment:3 Changed 13 years ago by Neil Roberts

(In [14790]) Refs #7300. Better buffer tag support !strict

comment:4 Changed 13 years ago by Neil Roberts

(In [14791]) Refs #7300. Small bug fixes for buffer tag support !strict

comment:5 Changed 13 years ago by Shane O'Sullivan

It is still necessary to construct a Context object to pass to the render method of HtmlTemplate?, rather than it constructing one for you based on a JSON object.

comment:6 Changed 13 years ago by bill

Priority: highnormal

Not a release hold-up.

comment:7 Changed 13 years ago by bill

Milestone: tbd1.3

Owners should mark these bugs w/a milestone (possibly future). Putting into 1.3 milestone temporarily (since 1.2RC has already been made)

comment:8 Changed 13 years ago by Robert Coup

Resolution: fixed
Status: newclosed

Works ok for me in r15810 with dtl/demos/demo_HtmlTemplated.html:

<button ... otherAttr2="x_{{item}}" >

gets rendered into (for "orange" values of item)

<button ... otherAttr2="x_orange" >

Reopen if you can reproduce.

comment:9 Changed 13 years ago by devTool

Resolution: fixed
Status: closedreopened

i noticed the same issue - but i was able to make it work by changing the attribute to something other then "id". Once i changed the attribute to "name" the rendering worked fine. I am currently using the 1.2 build. Let me know if you need a code submission to reopen.

comment:10 Changed 13 years ago by Adam Peller

Component: DojoxDojoX DTL

comment:11 Changed 13 years ago by Neil Roberts

Resolution: fixed
Status: reopenedclosed

Please only reopen if this occurs in trunk again, the releases have some issues with DTL

Note: See TracTickets for help on using tickets.