Hey there,
I need to append some JSON data into body text. I use function append() Jquery, but my addon did not pass the review because “This add-on is creating DOM nodes from HTML strings containing potentially unsanitized data, by assigning to innerHTML, jQuery.html, or through similar means.”.
This my code:
$.getJSON('https://website.com/', function(data){
if(data.status == 'success'){
$('body').append(data.data);
}
}
Please some one help me. What I must do to fix my code?
Thanks.