I am trying to read the html content using innerHTML. It seems to convert the '<' in the text content to '<' .
I would rather not to. Is there anything in JS that would allow me to render as such
Lodash supports an unescape() function that does this.
For example,
// This reads < as <
let html = document.querySelector('.el').innerHTML
// This converts the < back into <
html = _.unescape(html)
More answers are available in this question: Unescape HTML entities in JavaScript?