Opened 14 years ago

Closed 14 years ago

#7993 closed defect (fixed)

dijit._Templated escape sequence for quote replacement fails with compound values

Reported by: James Burke Owned by: bill
Priority: high Milestone: 1.3
Component: Dijit Version: 1.2.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

I want a token that should skip the double-quote escaping. It is called, so I reference it in the template like so:


However, that does not work. The key is not found. I believe this issue is at line 44 in dijit._Templated._stringRepl():

if(key.charAt(0) == '!'){ value = _this[key.substr(1)]; }

I believe for my key above, it is trying to look for _this[""], but I really want

Perhaps switching to something like this would work:

if(key.charAt(0) == '!'){ value = dojo.getObject(key.substr(1), false, _this); }

Change History (4)

comment:1 Changed 14 years ago by James Burke

Description: modified (diff)

comment:2 Changed 14 years ago by bill

Description: modified (diff)

Makes sense, that's how dojo.string.substitute does it (which is the code path that we follow when there is no ! mark).

Feel free to check that in if it's working for you.

comment:3 Changed 14 years ago by bill

Milestone: tbd1.3
Owner: set to bill
Status: newassigned

comment:4 Changed 14 years ago by bill

Resolution: fixed
Status: assignedclosed

Fixed in [15646].

Note: See TracTickets for help on using tickets.