mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 09:33:40 +08:00
4fa580fbd1
This reverts commit 2abe85b834
.
6 lines
164 B
JavaScript
6 lines
164 B
JavaScript
export function stringToHTML(string) {
|
|
const parser = new DOMParser();
|
|
const doc = parser.parseFromString(string, "text/html");
|
|
return doc.body.firstChild;
|
|
}
|