Unexpected output exporting to CSV with HTML characters in the TD
Unexpected output exporting to CSV with HTML characters in the TD
blueghostuk
Posts: 6Questions: 2Answers: 0
See the linked example: https://jsfiddle.net/blueghostuk/c4b0akzu/
when exporting to CSV the row is exported as
"Some More Text"">Some Text > Some More Text"
when it should be
"Some Text > Some More Text"
the html tag stripping is failing as the span title has the > character in it.
This can be worked around be encoding the title tag to use > but then the title tooltip shows > and not >
This discussion has been closed.
Answers
meant to read as you can change the title tag to use
>
but it renders as such and not > as desiredHi,
This is a limitation in the way DataTables handles the column titles at the moment I'm afraid. It doesn't do a great job when there is HTML inside an element's attributes.
This is something that needs to be addressed and is currently on the list.
Allan
Ok thanks, we have removed the title attribute anyway for now which works around this, but thanks for getting back to me