Fix getting html from inputs
This commit is contained in:
parent
373fa01b6e
commit
434caf7191
4
.env
4
.env
@ -1,5 +1,5 @@
|
|||||||
API_ID=1025907
|
API_ID=1025907
|
||||||
API_HASH=452b0359b988148995f22ff0f4229750
|
API_HASH=452b0359b988148995f22ff0f4229750
|
||||||
VERSION=1.4.3
|
VERSION=1.4.3
|
||||||
VERSION_FULL=1.4.3 (172)
|
VERSION_FULL=1.4.3 (173)
|
||||||
BUILD=172
|
BUILD=173
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
import encodeEntities from "../string/encodeEntities";
|
||||||
|
|
||||||
export default function documentFragmentToHTML(fragment: DocumentFragment) {
|
export default function documentFragmentToHTML(fragment: DocumentFragment) {
|
||||||
return Array.from(fragment.childNodes).map((node) => {
|
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('');
|
}).join('');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user