I’ve got a js-function which takes string as a parameter and get it displayed in a div element. Such string may contain html tags.
How do I force JS display inner text in div-elements as html-text with html-tags. And, also, what is an adequate way to filter particular tags, i.e. apply certain tags for styling and just print others.
You just need to replace
&and<(and optionally>if you like, but you don’t have to) with their respective entities, usingString#replace(spec, MDC) for instance.