Data not displaying with .text() jQuery to protect against XSS – Jquery ajax
I am displaying data from and API using Ajax call, this code works fine but is prone to XSS. <script> $(document).ready(function () { $.ajax({ url: "api/news/getallnews/1", type: "GET", dataType: "json", success: function (response) { var len = response.data.length; var table…