mRender is wrapping return in quotes

mRender is wrapping return in quotes

jpdonaghyjpdonaghy Posts: 4Questions: 0Answers: 0
edited February 2014 in General
I'm using mRender to add a checkbox to a column. On one page this works fine but on another the HTML text shows in the column. If I inspect the DOM the input tag is wrapped with quotes.

Why would mRender wrap the return in quotes?

I'm using this ...

"mRender": function (data, type, full) {
if (data == "1") {
return '';
} else {
return '';
}
}

In the DOM the contains ... Note the surrounding quotes, this causes the text to show instead of the HTML to be rendered.

""

Any help will be appreciated. I can not provide a link to my pages.

Replies

  • jpdonaghyjpdonaghy Posts: 4Questions: 0Answers: 0
    I'm seeing more odd behavior. I still see the HTML text in the table but there are no longer enclosing quotes around the HTML.

    I've tried mRender and fnRender. Both with the same result on one page but not on another.
  • jpdonaghyjpdonaghy Posts: 4Questions: 0Answers: 0
    For the life of me I can't get any HTML to render in this table. It all displays as text.

    I even tried placing the HTML directly into aaData, it still rendered as text.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Please link to a test case showing the problem. This trivial example shows it working: http://live.datatables.net/wehozuj/1/edit

    Allan
This discussion has been closed.