Including html/html-like content in data attribute for child row without AJAX
Including html/html-like content in data attribute for child row without AJAX
cedporter
Posts: 4Questions: 2Answers: 0
Piggy-backing off the question posed here, it appears the last question in this was never answered.
If you insert escaped html or xml into a data-child-value attribute, as shown in this fiddle, it won't display in the row when it is shown.
Is there some way to disable that?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
This will work for the example you provided.
I'm just not sure if there are other characters that also need to be replaced.
That doesn't get me all the way, but it did give me an idea. I found he.js. Processing the value with he.encode will disguise any troublesome entities, and let you store whatever you'd like in the value. I updated the fiddle, pasting he.js to illustrate the fix.
This will do just about the same, with a lot less coding.
That does work!