Sitecore RTE removes empty attributes

Using RTE in Sitecore 7.2 (possibly other versions), if an empty element is added to an element as HTML, switching to Design view and then back to HTML view, the empty attribute will be 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 Telerik RadEditor is an XHTML editor, but the Telerik Demo page ConvertToXhtml

can be disabled and the editor behaves the way I would like it to behave. How to disable ConvertToXhtml

using Sitecore?

I tried to remove

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


out of the pipeline fixXHtml

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


source to share

1 answer

Perhaps this article will help:

Prevent Sitecore content from being edited from the Script Tags section

Hopefully you just need to replace "RemoveScripts" with "ConvertToXhtml"



All Articles