PHP DOMNode entities and nodeValue

前端 未结 1 1073
予麋鹿
予麋鹿 2021-01-14 05:49

When getting the nodeValue of a DOMNode object that has entities in the nodeValue (i.e. a & gt;) then it converts the entity into it\'s printable character (i.e. >)

相关标签:
1条回答
  • 2021-01-14 06:36

    loadXML() takes an options argument, and one of the options is LIBXML_NOENT, which enables converting entities to their representations, so by default loadXML() shouldn't do so. However, there appears to be a bug in libxml that causes it to happen all the time, according to this bug report

    0 讨论(0)
提交回复
热议问题