fixed character garbling issue when loading markup into dom document.