Firefox 不再解释 XSLT-1.0 [英] Firefox doesn't interpret XSLT-1.0 anymore

查看:26
本文介绍了Firefox 不再解释 XSLT-1.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 XSLT 将大量数据保存在 XML 文件中,以便在 Firefox 中正确显示内容.但是从今天起,Firefox 不再解释 XSLT 并显示一个白页或一个块中的数据.

I have a lot of data saved in XML files with XSLT to show the content properly in Firefox. But from today, Firefox doesn't interpret anymore the XSLT and shows a white page or the data in a block.

我当前的 Firefox 版本是 68.0(64 位).新版本中的 XSLT 是否存在错误,还是在 Firefox 68.0 中默认仅禁用 XSLT?

My current Firefox version is 68.0 (64-bit). Is there a bug with XSLT in the new version or is XSLT only disabled per default in Firefox 68.0?

推荐答案

正如 Tim C 在评论中指出的那样,由于安全修复的副作用,使用 <?xml-stylesheet href="foo.xsl" ..?> 在从本地文件系统加载的 XML 文档中不再适用于 Mozilla.该问题报告为错误 https://bugzilla.mozilla.org/show_bug.cgi?id=1565261 但似乎无意修复它,因为 Chrome 和其他基于 Chromium 的浏览器很久以前就停止支持从本地文件系统加载的 XML 文档中引用的 XSLT.

As Tim C has pointed out in a comment, due to side effects of a security fix the use of <?xml-stylesheet href="foo.xsl" ..?> in XML documents loaded from the local file system is no longer working in Mozilla. The problem is reported as bug https://bugzilla.mozilla.org/show_bug.cgi?id=1565261 but it seems there is no intention to fix it as Chrome and other Chromium based browsers have stopped supporting XSLT referenced in XML documents loaded from the local file system long ago.

然而,错误报告中的讨论表明,将 about:config 中的 privacy.file_unique_origin 设置为 false 是一种解决方法".

The discussions in the bug report, however, suggest that the setting privacy.file_unique_origin in about:config to false is a "workaround".

请记住,它使您面临安全问题,该问题的修复禁止使用由 xml-stylesheet 处理从本地文件系统加载的指令引用的 XSLT.

Keep in mind that it exposes you to the security problem whose fix disabled the use of XSLT referenced by xml-stylesheet processing instructions loaded from the local file system.

这篇关于Firefox 不再解释 XSLT-1.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆