Greg Blass
Greg Blass

Reputation: 3660

Forward slash causing JS error with YADCF datatables plugin

I'm using YADCF to add filtering to a jquery datatable. The select boxes can be populated dynamically by the user.

A user entered a forward slash in one of the things added to a select box and it bugged the whole table.

It looks like there is a 'ignore_char" option, but that doesn't seem to help for me (trying ignore_char: '/', which I thought would be a forward slash).

Or is there some other best practice here to avoid this from causing an error?

It looks like if the user entered a '&' it would bug out too.

Anyone have any experience with this? Any best practice here to make sure the app doesn't break if someone enters a character in the name of the stuff we're filtering on?

Upvotes: 0

Views: 197

Answers (1)

Greg Blass
Greg Blass

Reputation: 3660

I don't know why I had the column data type set to 'html' because its been so long since I wrote this code, but removing that fixed the issue. Hopefully that doesn't break anything else.

Upvotes: 0

Related Questions