Trim the result of documentHtml() so jQuery 1.9.x can parse the string