Html encoding before Process httpRequest
Html encoding before Process httpRequest
In my database I store the data with html encoding Test&Test
. The actual value is Test&Test.
While I search the Test&
then it is return the value on Process but when I add Test&T
then Process not return any value.
The query is Select [Name] FROM [V_Test] WHERE ([Name] like '%Test&T%' WHERE (1=1) ORDER BY [ID] desc OFFSET 0 ROWS FETCH NEXT 25 ROWS ONLY
Is that any way we can manipulate the search value and pass the '%Test&T%'
?
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
This question has an accepted answers - jump to answer
Answers
I'm guessing you have server side processing enabled. Are you typing
Test&T
into the global search input or into a column search input? If using a column search input you could replace&
with&
before executing thecolumn().search()
.If this doesn't help then please provide more information of how you are performing the search.
Kevin
Yes. I am working on server side. But I am using search builder and global search. Search is part of http request form collection in .net.
I have one option that I do html encoding inside sql view. But it is affecting query performance.
If you store the data HTML encoded, and the search is being done against the database, you'd need to HTML encode the search term as well. Can you not just do that before you perform the search?
Allan
Figure out encode the HTML form before request submit to the Datatables.net for process.