3
votes

Using the RTE in Sitecore 7.2 (probably other versions as well), if an empty attribute is added to an element in HTML view, switching to Design view and then back to HTML view, the empty attribute is removed. For example, I added <span data-test="">test</span> then clicked Design and then HTML, and my element turned into <span>test</span>.

I know the Telerik RadEditor is an XHTML editor, but on the Telerik Demo page, the ConvertToXhtml can be disabled and the editor behaves as I would like it to behave. How can the ConvertToXhtml be disabled using Sitecore?

I've tried removing

<processor type="Sitecore.Pipelines.FixXHtml.ConvertToXHtml, Sitecore.Kernel"/>

from the fixXHtml pipeline, but that didn't change the behavior. I also tried following How do I turn off XHTML validation in Sitecore? but that only changed validation after the fact (the empty attribute was removed before showing Sitecore validation warnings/errors).

1

1 Answers

3
votes

Maybe this article will help:

Prevent Sitecore Content Editor From Stripping Script Tags

Hopefully, you should just need to substitute "RemoveScripts" with "ConvertToXhtml"