added DOMParser extension to work with IE and Firefox, hopefully. Also added html-escaping enhancement suggested by gareth heyes