.data() results are not actually raw, converting &
.data() results are not actually raw, converting &
I'm trying to store a URL with query args in a hidden column. I can get the data from the row when clicked. All good.
However, the & in the URL is causing problems.
This is what I get back from data()
"http://dev.xxxx.com/wordpress/statistics?GUID=aae1bc99-03a9-c6ae-4447-5cc66fca7f66§ion=leaderboard"
This is the data (part of html):
<td class='LINK column-LINK'>http://dev.xxxx.com/wordpress/statistics?GUID=aae1bc99-03a9-c6ae-4447-5cc66fca7f66§ion=leaderboard</td
You can see that "§" was converted to §. This is a hidden, non-rendered cell, but data() should return raw regardless.
This is on Chrome. I can encode in the HTML and then search/replace in javascript to undo that encoding, but that's quite a hack. I may have to use some method other than data(). Any thoughts?
Answers
Agreed - the
data()
functions should always return the raw data. Is thisdata()
,row().data()
,column().data()
orcell().data()
you are having problems with?Can you link to a page showing the error so I can debug it please? JSFiddle, CodePen or http://live.datatables.net can be used to create a test page if you can provide a link to the page you are working on.
Allan