It's difficult to explain with basic sentences so here the code :
template.phtml
<p id="text"><?php /* @escapeNotVerified */ echo __('Some text [[REPLACE]]') ?></p>
Javascript
var list = '<ul><li>A</li><li>B</li></ul>';
$("#text").text(function(index, text) {
return text.replace("[[REPLACE]]", list);
});
Actual outcome
Some text <ul><li>A</li><li>B</li></ul>
Desired outcome
Some text
- A
- B
It seems that Magento 2 won't interpret HTML generated. Is there a way ?