Eduard Kuzmenko
3 years ago
2 changed files with 5 additions and 3 deletions
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
||||
API_ID=1025907 |
||||
API_HASH=452b0359b988148995f22ff0f4229750 |
||||
VERSION=1.4.3 |
||||
VERSION_FULL=1.4.3 (172) |
||||
BUILD=172 |
||||
VERSION_FULL=1.4.3 (173) |
||||
BUILD=173 |
||||
|
@ -1,5 +1,7 @@
@@ -1,5 +1,7 @@
|
||||
import encodeEntities from "../string/encodeEntities"; |
||||
|
||||
export default function documentFragmentToHTML(fragment: DocumentFragment) { |
||||
return Array.from(fragment.childNodes).map((node) => { |
||||
return node.nodeType === 3 ? node.textContent : (node as Element).outerHTML; |
||||
return node.nodeType === 3 ? encodeEntities(node.textContent) : (node as Element).outerHTML; |
||||
}).join(''); |
||||
} |
||||
|
Loading…
Reference in new issue