Add case-sensitive tag using fnAddData.

Add case-sensitive tag using fnAddData.

junaedjunaed Posts: 18Questions: 7Answers: 0

Hi, I am using datatable 1.9, and using fnAddData to add a new row to the datatable. One column of the row needs to be rendered using a custom UI component using a case sensitive tag (say <a:newTag>). So I am trying to do this:

var tagCode = "<a:newTag></a:newTag>";
$('#datatableId').dataTable().fnAddData([tagCode, "second column", "third column"]);

However, somehow the first column tag is being changed to <a:newtag></a:newtag> (converting to all lower case).
The tag is case sensitive, hence this is not rendering anything. Do you have any suggestions?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,234Questions: 1Answers: 10,417 Site admin
    Answer ✓

    I've just tried a few tests: http://live.datatables.net/lofubono/1/edit . It looks like a browser issue rather than one with DataTables - I just write to the document with innerHTML, but the browser is making it lower case as can be seen in the last case.

    In fairness the HTML spec says that tags are case insensitive, so I doubt any of the browser makers will plan to alter the behaviour they currently have.

    Allan

  • junaedjunaed Posts: 18Questions: 7Answers: 0

    Thanks Allan.

This discussion has been closed.