Datatable print button not working properly if there is alert("hello"); in table.
Datatable print button not working properly if there is alert("hello"); in table.
gobind
Posts: 1Questions: 1Answers: 0
Datatable print button not working properly if there is alert("hello"); in table.
it is giving alert msg.
This discussion has been closed.
Answers
Could you provide a link to a test case in future, as requested in the forum rules please. I've put this one together for now to demonstrate the issue: http://live.datatables.net/facekusa/1/edit .
What is happening is that the export will strip the HTML tags leaving only the text. It would probably remove the text content of the
script
tag, I don't see why we would ever want to do that. I've filed a bug and it will be in the next release of Buttons. I'll post back here when the commit is made.For now you would need to use a custom formatter to strip the text as you require.
Allan
Little update - this has finally been fixed in this commit.
Allan