Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Column filter does not deal with HTML in the same way as the global filter #158

DataTables opened this Issue · 1 comment

1 participant


If you have a row with &lt; in it, and do a global server for < it will correctly find it. However, if you do a column filter for < it will not. This is because the handling for the HTML entities is done in _fnBuildSearchRow which is not used for column filtering.

The same code to do the convert could be thrown into _fnFilterColumn but that's really sub-optimal. I think the filtering needs to be altered to harmonise this.

@DataTables DataTables referenced this issue from a commit
@DataTables Internal: Filtering invalidation
- Like sorting, for the new API we need to be able to invalidate data
  held for filtering in a fairly simple manner (it could be done before,
  but it was messy, see fnUpdate - you need to call the methods in the
  parent function, rather than just invalidating). This commit adds that
  ability to DataTables.

- Performance improvements:
  - The big one is that filtering data is only obtained and formatted
    when invalidated, rather than every full filter now.

  - Regular expressions for newline and HTML matching are variables,
    rather than redefined on every call.

  - DIV for reading text version of an HTML formatted string is a
    variable, rather than being recreated on every call.

- Type based formatters have been moved into the extension API ('string'
  and 'html'). They can be overridden there if wanted. Allows
  simplication of the call for the formatter.

- Fixes issue #158 as part of the refactoring.

- Smaller by 22 bytes (compressed)... Likely once invalidation is fully
  implemented that will be swallowed up...

This has been fixed in commit fbc2862.

@DataTables DataTables closed this
@tduchateau tduchateau referenced this issue in dandelion/dandelion-datatables

Remove HTML tags when filtering columns with body #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.