Changed encoding. Added an id to the temporary dom Element