discourse/test/javascripts/helpers/html-helper.js.es6

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
164 B
Plaintext
Raw Normal View History

export function stringToHTML(string) {
const parser = new DOMParser();
const doc = parser.parseFromString(string, "text/html");
return doc.body.firstChild;
}