Filtering and html

Filtering and html

karinekarine Posts: 4Questions: 0Answers: 0
edited December 2013 in DataTables 1.9
As I understand of some older threads, there is a bug in 1.9.4, that won't strip off the html in a column when filtering the table. I haven't found any recent information about this, so I would like to ask if anyone has found a good solution to this problem?

Replies

  • lenbo41lenbo41 Posts: 3Questions: 0Answers: 0
    As a workaround I did this:

    In your aoColumns[ ] section, for each column that contains data adorned with HTML:
    1. set {"bSearchable:false"} for that column
    2. define an auxiliary hidden column (which will contain the unadorned data) and set
    {"bSearchable":true, "bVisible":false}
  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin
    You could try 1.10 where this issue is resolved: https://github.com/DataTables/DataTables/blob/1_10_wip/media/js/jquery.dataTables.js

    Allan
  • karinekarine Posts: 4Questions: 0Answers: 0
    lenbo41, thank you for your suggestion, but I did not get that to work. Seems like the hidden column just disappears. And I have some columns with html, so it would probably be a mess :)

    But I've tried 1.10 now, and it seems very promising. Thank you. Do you know when we can expect a release of 1.10?
  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin
    January. Going into beta in the next week or so - I'm just wrapping up the documentation.

    Allan
This discussion has been closed.