0

I'm saving data in the table below: htmlspecialchars($message)

I want to retrieve the data and show it in datatable using javascript with the design that has in the table column.

"columns": [
            { "data": "cpc_id" },
            { "data": "cpc" },
            { "data": "message" },
            { "data": "name" },
            { "data": "active" },
            {
                "mDataProp": function ( data, type, full, meta) {
                    var $table_fulldata=JSON.stringify(data);
                    $return_data='<a class="btn btn-info btn-sm edit-lead-attribute-message" href="#"><i class="fas fa-pencil-alt"></i></a>';
                    $return_data+='<a style="margin-left: 2px;" class="btn btn-danger btn-sm remove-lead-attribute-message" href="#"><i class="fas fa-trash"></i></a>';
                    $return_data+="<input type='hidden' name='cpc_id' class='cpc_id' value='"+(data.cpc_id)+"'>";
                    return $return_data;
                }
            },
        ],
Balamurugan M
  • 580
  • 5
  • 9

1 Answers1

0

_.unescape(input)

This method converts the HTML entities &amp;, &lt;, &gt;, &quot;, and &#39; in string to their corresponding characters