覆盖 Sitecore 中富文本字段的 XHTML 验证
我正在尝试嵌入一些渲染,详见 这篇文章。但是,当我尝试将渲染添加到富文本字段中时,我收到 XHTML 验证错误。我无法为客户端禁用 XHTML 验证,因此我想扩展用于验证的架构。它存储在 /sitecore/shell/schemas 目录中。
我尝试嵌入的渲染标记是:
<smart:addresssnippet runat="server" />
我尝试为智能命名空间添加新架构,但这似乎不起作用。当我返回富文本字段的 HTML 时,Sitecore 已将代码重写为:
<smart:addresssnippet runat="server" xmlns:smart="http://www.sitecore.net/xhtml"></smart:addresssnippet>
验证失败。有没有人遇到过这个或将渲染添加到验证模式的方法?
I'm trying to embed some renderings as detailed in this article. However when I try to add a rendering into a Rich Text field I get XHTML validation errors. I can't disable XHTML validation for the client so I wanted to extend the schema used for validation. This is stored in the /sitecore/shell/schemas directory.
The markup for the rendering I'm trying to embed is:
<smart:addresssnippet runat="server" />
I've tried to add a new schema for the smart namespace but this doesn't seem to work. When I go back to the HTML for the Rich Text field Sitecore has rewritten the code to be:
<smart:addresssnippet runat="server" xmlns:smart="http://www.sitecore.net/xhtml"></smart:addresssnippet>
This fails validation. Has anyone encountered this or a way to add renderings to the validation schema?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经测试过将本地实例上的以下 xml 添加到 sitecore\shell\Schemas\xhtml.xsd 中,它会根据需要呈现您的标记,并且在富文本编辑器中不会出现验证错误。
I've tested adding the following xml on my local instance to sitecore\shell\Schemas\xhtml.xsd and it renders you tag as you wanted and does not have validation errors in the Rich Text Editor.
我会在此处联系 Sitecore 支持人员(前提是您已登录),或者您也可以尝试此处。
I would contact Sitecore support here (provided you have a login for it) or maybe you could also try here.