Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#9236 closed defect (fixed)

[regression]DataGrid "get:" returns markup, not rendered markup

Reported by: Frank Fortson Owned by: Bryan Forbes
Priority: high Milestone: 1.4
Component: DojoX Grid Version: 1.3.0
Keywords: DataGrid get markup not rendered Cc: frank.fortson@…
Blocked By: Blocking:

Description

The DataGrid? no longer renders the html markup returned by the "get" parameter's function reference in the DataGrid? constructor.

The regression seems to have occurred 4/21/2009.

http://archive.dojotoolkit.org/dojo-2009-04-22/dojotoolkit/dojox/grid/tests/test_subgrid.html

See the html markup in the left column (Cell0 heading).

Change History (9)

comment:1 Changed 11 years ago by Frank Fortson

comment:3 Changed 11 years ago by jfirebau

I agree with you Frank that we need a graceful fix to this problem. From what I have been reading on the forums it is being suggested that we now have to add a custom formatter to get HTML rendering within a cell. And some are using String replace methods to get there.

This "feature 9173" needs to be something that can be turned on/off. There are very legitimate scenarios where a developer would want the HTML markup to be displayed without adding a formatter. In fact, the proposed solutions adds precious processing time to the rendering of each cell.

Now we are requiring a developer to perform a string replace on the data to convert all '<' symbols back -- not to mention the Grid code had a string replace to convert them to HTML entities prior to the formatter. That's a double hit to rendering performance on each cell render.

My current Dojo 1.2.3 project uses HTML markup as cell contents all columns of data, which gives me the freedom to allow the server to dictate how the cells render.

comment:4 Changed 11 years ago by vlad

I entered a bug on the same issue (but this one is earlier) http://bugs.dojotoolkit.org/ticket/9246

My problem is that I use Grid cells in the search just like in Yahoo store example, and those search grid essentially perform the job of 'Menu' throughout my system. Since links cannot be now displayed, all of my navigation is disabled. (I use server code, just like jfirebau to decide what markup is in html cell)

comment:5 Changed 11 years ago by vlad

Can somebody please help to get http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/grid/tests/test_yahoo_images.html working again

I still do not understand why in that example why string returned by getLink formatter function is not causing cell to render the text?

comment:6 Changed 11 years ago by dante

see [17538] for initial checkin. in trunk, need to push to branch too maybe? @BryanForbes??

comment:7 in reply to:  3 Changed 11 years ago by arussell

Replying to jfirebau:

This "feature 9173" needs to be something that can be turned on/off. There are very legitimate scenarios where a developer would want the HTML markup to be displayed without adding a formatter. In fact, the proposed solutions adds precious processing time to the rendering of each cell.

Additional request for this to become an option. I'm reverting to Dojo 1.3.0 until this is fixed.

comment:8 Changed 11 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

There is now an escapeHTMLInData option that can be set to false to disable HTML escaping. Also, you can also use the formatter function to render HTML without disabling HTML escaping (this is what I would recommend).

comment:9 Changed 10 years ago by Adam Peller

Milestone: tbd1.4
Note: See TracTickets for help on using tickets.