jquery - Datatables encode HTML -


code> is used.

Unfortunately, I got a serious security problem, i.e. XSS (cross-site scripting). The server returns JSN data and the client loads the data without any scope.

How can I save the table before loading it in the table?

There is a callback function to manipulate table row elements after the row has been created.

$ table = Data-worthy :: table () To generate this function, I used the Chumper / DataAbout - & gt; AdKum ('id', 'username', 'name', 'email', 'actions') - & gt; SetUrl (from URL :: ('admin / users / data')) - & gt; SetOptions (array '(aoColumns' = & gt; array (array ('sType' = & gt; 'numeric'), empty, empty, zero, array ('bSortable' => ()) - & gt; ; ("Td: eq" (+ "+ i +") for set callback ('fnCreatedRow', 'function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {{var i = 1; i & lt; 4; i ++) ) ", NRow) .text (aData [i]);} ') -> noScript (); return see :: create (' admin.users.index ', compact (' table '));

I used fnCreatedRow to modify the content of each td elements, so the td element data Display Text (HTML Encode As bread).

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -