Prep Data, what would break datatable
Prep Data, what would break datatable
I've got a database which has simply got company information in such as company name, telephone number, revenue and business description.
It's my own data so there is nothing in there that could have been added by a third party and it's on a internal network too. So the data is safe. However, i'm outputting it and paging through it and sometimes it gets to a point where it says processing and wont load the next set of data. I can see the data in the ajax response from the server using firebug but that data is not being rendered in to datatables for some reason.
So far i'm htmlentities(addslashes($data)), is there anything else i should do to prep the data to make sure anything will get loaded?
Thanks
It's my own data so there is nothing in there that could have been added by a third party and it's on a internal network too. So the data is safe. However, i'm outputting it and paging through it and sometimes it gets to a point where it says processing and wont load the next set of data. I can see the data in the ajax response from the server using firebug but that data is not being rendered in to datatables for some reason.
So far i'm htmlentities(addslashes($data)), is there anything else i should do to prep the data to make sure anything will get loaded?
Thanks
This discussion has been closed.
Replies
Allan
Thank you!
I've added ENT_QUOTES to my htmlspecialchars and it's working like a dream.
Thanks again!
However it sounds like you've got it sorted now :-). The JSON parser in jQuery 1.4 is very particular about the formatting. 1.7 will give an alert error when this occurs...
Allan