节点js NPM cheerio“转入”

我的应用程序正在请求一个服务器,并获得HTML。

当html返回时,我通过cheerio运行它并修改在html中find的域名。

当stringJson正在返回cheerio正在取代“与”这是导致它不能被JavaScriptparsing。

在HTML中的s不会被改变为cheerio。任何人都可以告诉我为什么它改变了stringJSON而不是HTML,并告诉我如何阻止它变成“

Cheerios输出我的HTML

<div id="et-info"> <span id="et-info-phone">+44 0000 000000</span> <a href="mailto:hello@newdomain.com"><span id="et-info-email">hello@newdomain.com</span></a> </div> 

未parsing的Jsonstring的Cheerios输出

 {&quotresult&quot:&quotsuccess&quot,&quotredirect&quot:&quothttp:\/\/www.domain.com\/checkout\/order-pay\/3798?key=wc_order_55d7344aa233b&quot} 

我已经尝试添加

decodeEntities:true

 var $ = cheerio.load(html[key], { decodeEntities: true }); 

将decodeEntities设置为false将会解决正在发生的事情。

 var $ = cheerio.load(html[key], { decodeEntities: false});