After a successful ajax call, I want to print the result on screen (in a DIV). This result is a piece of HTML code.
$.ajax({
url: window.location.pathname + '/feedback-campaigns',
type: 'GET',
contentType: 'text/html',
success: function(data, textStatus, jqXHR) {
var result = data.campaigns.campaigns[0].text;
// result = "<b>TEST - do you see me?</b>"
$('.campaign-top-product-detail-page').html(result);
},
error: function(jqXHR, textStatus, errorThrown) {
console.log('NOK');
}
});
But, on screen I see this:
<b>TEST - do you see me?</b>
instead of the text in bold.