use textContent to get the contents of the code element

in order to support the use of character entities such as &lt; and &gt;