Fix handling of non-Element nodes in DomUtil#insertHtml()
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 20 Apr 2021 13:52:49 +0000 (15:52 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 20 Apr 2021 13:57:11 +0000 (15:57 +0200)
commitd81f929492a2731e1c0ef9281b007ac2f75fdd1c
tree004befb2ea4d01a441d20bb62657ca70bb4bbac7
parent3c2b6c0fda4fb8b4a0aa089061be9066a1fe82c5
Fix handling of non-Element nodes in DomUtil#insertHtml()

The function was rewritten to make use of simple appendChild() / insertBefore()
calls in combination with a DocumentFragment vs. inserting all children within
the given `html` manually.

This fixes the Twitter Embed functionality if user consent is required.
ts/WoltLabSuite/Core/Dom/Util.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Dom/Util.js