English 中文(简体)
• 与SLT一起冻结超文本实体
原标题:Unescaping HTML entities with XSLT

我有外部文字,因此我的XSL模板,含有逃避的html特性。 我怎么能以异常低价竞标来看待这一问题,并将它提交最后文件?

我已经逃脱了结局,-disable-output-escaping='yes>可帮助我。

例如(来自外部文字):

<!--376473658726587-->
<a href="/">some text</a>
最佳回答

www.un.org/Depts/DGACM/index_spanish.htm 这一转变:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="text"/>
 <xsl:strip-space elements="*"/>

 <xsl:template match="script">
  &lt;script>
    <xsl:value-of select="normalize-space()"/>
  &lt;/script>
 </xsl:template>
</xsl:stylesheet>

< 当在《XML文件上应用时(你未能提供!!!!!):

<script>
&lt;!--376473658726587--&gt;
&lt;a href="/"&gt;some text&lt;/a&gt;
</script>

<produces the Hope,那末正确结果:

  <script>
    <!--376473658726587--> <a href="/">some text</a>
  </script>
问题回答

暂无回答




相关问题
How do I escape a string for a shell command in node?

In nodejs, the only way to execute external commands is via sys.exec(cmd). I d like to call an external command and give it data via stdin. In nodejs there does yet not appear to be a way to open a ...

Do I need to escape this?

It might be a bit unusual, but I need to echo <?php. However, I think that PHP treats it as an actual <?php and starts executing code instead of treating it as a string. How can I escape <?...

热门标签