#10970 closed defect (fixed)
form widgets don't escape quotation marks inside name attribute
Reported by: | peirix | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | Dijit | Version: | 1.4.2 |
Keywords: | attributes parser quotation | Cc: | |
Blocked By: | Blocking: |
Description
When using quotation marks inside an attribute, the parser will break the value. And as such, they won't work with forms, as their names are broken.
To reproduce:
<textarea dojoType="dijit.form.SimpleTextarea" name="data.locale['en']">
Will produce this:
<textarea class="dijitTextArea" ]="" en="" name="data.locale[">
There seems to be one way around this, but it's an ugly hack, and not always possible (i.e. when getting attribute values from database), and that is to escape the quotation marks manually like so:
<textarea dojoType="dijit.form.SimpleTextarea" name="data.locale['en']">
Change History (7)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Component: | Parser → Dijit |
---|---|
Milestone: | tbd → 1.5 |
Status: | new → assigned |
Summary: | Parser doesn't escape quotation marks inside attributes → form widgets don't escape quotation marks inside name attribute |
The parser is working perfectly, you can tell if you check myTextArea.params. The issue is actually in _FormWidget.postMixInProperties which sets up the name to be inserted into the template. I can fix.
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 11 years ago by
comment:5 Changed 11 years ago by
Milestone: | 1.5 → 1.6 |
---|
comment:7 Changed 9 years ago by
Milestone: | 1.6 → 1.8 |
---|
Note: See
TracTickets for help on using
tickets.
It seems the hack does not work with dojo 1.4.2, but I'm fairly sure I got it to work with dojo 1.4.0