fnFilter does not decode column data containing HTML special characters
fnFilter does not decode column data containing HTML special characters
![flukey](https://secure.gravatar.com/avatar/408b83bba561d414123514a80d3526f6/?default=https%3A%2F%2Fvanillicon.com%2F408b83bba561d414123514a80d3526f6_200.png&rating=g&size=120)
If column data includes HTML special character such as '&', fnFilter is not not correctly filtering. I tracked it down to:
[code]
Line 6593: if ( (sData=oCol.fnGetData( oData )) === undefined )
[/code]
This will return the contents of the table cell in question, however, it does not decode the contents if it includes an HTML special character.
I alleviated this issue by writing on my own html special character decoding function, htmlspecialchars_decode(string, quote_style) and calling it at:
[code]
Line 6614: return htmlspecialchars_decode(sData, 'ENT_NOQUOTES');
[/code]
It would be helpful if there was an option to enable/disable HTML decode on filter.
[code]
Line 6593: if ( (sData=oCol.fnGetData( oData )) === undefined )
[/code]
This will return the contents of the table cell in question, however, it does not decode the contents if it includes an HTML special character.
I alleviated this issue by writing on my own html special character decoding function, htmlspecialchars_decode(string, quote_style) and calling it at:
[code]
Line 6614: return htmlspecialchars_decode(sData, 'ENT_NOQUOTES');
[/code]
It would be helpful if there was an option to enable/disable HTML decode on filter.
This discussion has been closed.