我有以下HTML块:
<p>The quick brown fox jumps over the lazy dog — The quick brown fox jumps over the lazy dog.</p>
<p>The quick brown fox jumps over the lazy dog — The quick brown fox jumps over the lazy dog.
<br>The quick brown fox jumps over the lazy dog — The quick brown fox jumps over the lazy dog.
Run Code Online (Sandbox Code Playgroud)
它不是有效的XHTML.但是,我需要将此HTML包含在XML文档中.我尝试使用XMLFormat()以转换为<to <和>to >,这很有效.不幸的是,它也转换—为&mdash;无效,并在CFXML标记中抛出异常.
<cfxml variable="myXML">
<content>#XMLFormat(myHTML)#</content>
</cfxml>
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?