DomDocument and html entities

前端 未结 4 495
臣服心动
臣服心动 2021-01-03 06:38

I\'m trying to parse some HTML that includes some HTML entities, like ×

$str = \' A × B\';

$do         


        
4条回答
  •  时光取名叫无心
    2021-01-03 06:50

    I am facing the same problem, in fact, utf8_encode and deccode do the trick for some cases but not all of them, for example Σ can not be rendered using utf-8 decode function, the basic idea which we need is to keep html entities as they are in the string.

提交回复
热议问题