dna
dna

Reputation: 61

Dojo 1.4 - <a href> in dojox.grid.DataGrid's cell behaves differently from Dojo 1.3's

In Dojo 1.3 I was able to populate dojox.grid.DataGrid's cell with an <a href> HTML element (e.g. <a href='/test?id=xxx'>xxx</a>) and the (clickable) html link would then be shown. Dojo 1.4 breaks(?) this behaviour and the literal string is shown (not a link).

How can I achieve the same behaviour in Dojo 1.4?

Upvotes: 3

Views: 5883

Answers (2)

JoseM
JoseM

Reputation: 4302

Are you creating the link dynamically using a formatter or are you passing the html formatted from the server? You have to be careful of XSS attacks if you are passing html data into the Grid. The recommended way to create a link is to use a formatter, there is an example and an explanation of the setting on http://docs.dojocampus.org/dojox/grid/DataGrid

Upvotes: 1

dna
dna

Reputation: 61

figured it out in the meantime, setting the new escapeHTMLInData boolean parameter to false (defaults to true) fixes this...

Upvotes: 3

Related Questions