Is it possible to return jQuery or DOM objects from the fnRender functional property?
Returning string values is vulnerable to HTML code attack. If DOM objects are accepted, it can be safer.
afaik, no. but I recall Allan posting something about a month ago where he hinted that it's possible to get DOM/jQuery objects during fnRender.. ? you might need to scour the forum for that.
Thank you for the reply.
I remember that I've read something similar before here. I think that it is reasonable and it maybe even bring better performance by returning DOM/jQuery objects from fnRender rather than HTML codes.
This is the thread the fbas refers to: http://www.datatables.net/forums/discussion/4975/fnrender-friendly-suggestion-to-return-also-jquery-objects/p1#Item_10 . The basic answer is, no this is not currently possible, and it would likely require a good be of reorganising in the DataTables core to make it possible. If you need to manipulate the DOM then fnRowCallback is the way to go at the moment.
Replies
I remember that I've read something similar before here. I think that it is reasonable and it maybe even bring better performance by returning DOM/jQuery objects from fnRender rather than HTML codes.
Allan