Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#18792 closed defect (fixed)

CSVWriter of EnhancedDatagrid has a bug with how it formats cells

Reported by: Jared Jurkiewicz Owned by: Evan
Priority: high Milestone: 1.11
Component: DojoX Grid Version: 1.8.10
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Jared Jurkiewicz)

CSVWriter of EnhancedDatagrid? has a bug with how it formats cells. Specifically it is this code:

func = this._formatCSVCell;

..

row.push(func(this._getExportDataForCell(arg_obj.rowIndex,

The problem here is that _formatCSVCell refers to 'this' in its implementation, but this deference here breaks what 'this' (if(result.indexOf(this._separator) >= 0
result.search(/[" \t\r\n]/) >= 0){ ... ) will resolve to (It will now resolve to window) as it is now an unattached function scope. It needs to be func = lang.hitch(this, this._formatCSVCell);

Without fixing this, any content with a , in it will fail as it won't escape the ,. We had a customer hit this issue.

Patch forthcoming.

Change History (8)

comment:1 Changed 4 years ago by Jared Jurkiewicz

Component: GeneralDojoX Grid
Owner: set to Evan
Priority: undecidedhigh

comment:2 Changed 4 years ago by Jared Jurkiewicz

Description: modified (diff)
Milestone: tbd1.11

comment:3 Changed 4 years ago by Jared Jurkiewicz

comment:4 Changed 4 years ago by Jared Jurkiewicz <jjurkiew@…>

Resolution: fixed
Status: newclosed

In 18cf246/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:5 Changed 4 years ago by Jared Jurkiewicz <jjurkiew@…>

In f57ecf6/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:6 Changed 4 years ago by Jared Jurkiewicz <jjurkiew@…>

In 5ac6237/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:7 Changed 4 years ago by Jared Jurkiewicz <jjurkiew@…>

In 3c45e2a/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:8 Changed 4 years ago by Jared Jurkiewicz

Version: 1.10.41.8.10
Note: See TracTickets for help on using tickets.