Heading Elements Add Invalid HTML in Cornerstone

I have a number of heading elements (h1-h6) on my pages. When using the visual editor (Cornerstone) to change the heading (click the heading element, on the left side toolbar click the Edit button) it automatically wraps the content in a p tag. This results in a p tag inside of an h tag, which is semantically invalid html. Our SEO scanner (Moz Pro) complains about this. The only way I can keep this from happening is to enter html mode and remove the p tags. As soon as somebody else makes a visual edit they come right back.

How can this be solved? It feels like a bug to allow this to happen.

Hello Spectra,

Thanks for writing in! To resolve this, please change the default view of the Rich Text Editor Default. Go to X/Pro > Settings > User Preferences and then set the “Rich Text Editor Default” to “Always OFF”.

Please let us know if this works out for you.

This is okay for me because I know HTML, but this is a client website. The client writes with the visual builder. If that is your only possible solution I guess I will have to do it, but it is less than ideal. I’m quite surprised you aren’t filtering titles and you have to change a global setting to fix this.

Hi Spectra,

Yes, you got a point, I’ve submitted this to our issue tracker so the developers will be made aware of it.

Thanks,

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.