I want to insert a div tag with google tag manager, but I get a weird result. This is the situation:
Tested Browser: Chrome (but this failure was validated from external party too)
The google tag manager code
<div>my content</div>
<script>
document.write("<div>conetnt in the middle</div>");
</script>
<div>another content</div>
The unexpected result (copied from DOM)
<div>my content
<script>document.write("\x3cdiv\x3econetnt in the middle\x3c/div\x3e");</script>
<div>conetnt in the middle
<div>another content</div>
</div>
</div>
Anyone has any idea, why this happens?