HTML tags are removed , when searching/filtering
HTML tags are removed , when searching/filtering
Hey guys, i am using datatable for my project.Now for so many days i am stuck on an issue.
List that am getting is having content in html format,means it includes images,all styles.At first time everything looks good ,, when datatable is initialised,but when we do any filtering, all HTML tags are striped, only text /string is left.
I want to maintain that styles (HTML tags )and images ...please provide me any solution for this...
This question has an accepted answers - jump to answer
Answers
allan, does dis issue has a solution or not ???
Can you provide the code that you're running so we can provide help to you? Please see the sticky forum which provides the rules of this forum. Thank you.
Thanks MOdgility for reply . Actually i am using alphabet search like this http://www.datatables.net/blog/2014-08-26 . Everything works fine ,but content inside table is encoded in html tags.
SUppose COntent in starts with a is like
<div>akfjfvjkv <b> hello </b> </div>
.Initially wen table loads this b tags are shown.When we click on 'B' and come to 'A', those html tags are striped ...this is the prob i am facing ...So you want to be able to click on
d
and get your div tag? Unusual! But what you should be able to do is use thecolumns.type
option and set it to bestring
. That will stop DataTables striping the HTML for sorting and filtering. I'm not sure I've come across a request for that before :-)Allan
hey allan , i got the ans .i made a mistake ... thanks for ur reply :)