bug in title/filename using file export buttons when svg present on page
bug in title/filename using file export buttons when svg present on page
Hello,
The documentation for the built-in file export buttons in version 1.4.2 states the special character * represents the host document's title
tag for the title and filename options. However, <title> is also valid within an svg
object. The file export buttons are concatenating all title tags on the page, rather than using only the HTML's title. To correct for this, I have had to include the following in my code:
var t = $('#myTable').DataTable(
{
buttons: [
{
extend: 'excel',
filename: $('head > title').text(),
title: $('head > title').text()
}
]
}
);
Thanks,
John
This question has an accepted answers - jump to answer
Answers
Hi John,
Very good point - thanks for bringing that up! I've committed a fix and it will be in the next release (which will be before the end of the month).
Regards,
Allan