Search with &
Search with &

Hi all, I am having trouble searching my table. Some rows have & in the data (ie: TEST-R&D | Timesheet | Work). When using the search field it doesn't match when inputting TEST-R&D, but match when inputting TEST-R&
I am using both method to search / filter:
var val = $.fn.dataTable.util.escapeRegex($(this).val());
column.search( val ? '^'+val+'$' : '', true, false ).draw();
and
table.search(this.value).draw();
Any ideas?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Seems to work here:
http://live.datatables.net/yaparime/1/edit
Please update the test case or provide a link to your page so we can see exactly what you have and what you are doing.
Kevin
Thank you! A good night of sleep will help and if it's still not working will drill down my implementation and come back here.
@kthorngren Thanks for your time on this one. It works, the ajax json is converting & to &
& to
&