"data" in "rowCallback" option is HTML encoded.

"data" in "rowCallback" option is HTML encoded.

twistedwhispertwistedwhisper Posts: 3Questions: 3Answers: 0

Referring to https://datatables.net/reference/option/rowCallback

$('#example').dataTable( {
  "rowCallback": function( row, data ) {
    console.log(data.test); // will print out "2 > 1" instead of the original "2 > 1"
  }
} );

It seems that the properties/columns in data are HTML encoded. Is there any way to obtain it in its original unedited form?

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    I tried that with this example : https://live.datatables.net/famoqawe/1/edit , and it's displaying the original data as expected.

    Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.

    Colin

Sign In or Register to comment.