doufan9805
2016-04-09 17:48
浏览 98
已采纳

脚本标记中的Symfony dom-crawler字符串转换为UTF8

I have this HTML content:

<div>测试</div>
<script charset="utf-8" type="text/javascript">
    function drawCharts(){
        console.log('测试');
    }
</script>

When I use the Symfony's dom-crawler, the text is being HTML encoded. How can I prevent this? $crawler->html() results:

<div>测试</div>
<script>
    function drawCharts(){
        console.log('&#27979;&#35797;');
    }
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题