jbroadway / elefant

Elefant, the refreshingly simple PHP CMS and web framework.
http://www.elefantcms.com
MIT License
209 stars 39 forks source link

Not valid html when insert dynamic objects in redactor #242

Closed pincher2012 closed 9 years ago

pincher2012 commented 9 years ago

Dynamic objects are wrapped in paragraph tag when inserting through a visual editor. Markup is not valid, when output of dynamic object contains flow content.

jbroadway commented 9 years ago

I haven't found a good solution to fix this since the embed code gets inserted into a <p> tag automatically by the Redactor editor. Stripping the outer tag caused other issues when moving copy around in the editor, so I left it in. Aside from the markup passing validation tests, it doesn't cause any visible rendering issues at least.

techanon commented 9 years ago

I think there was an update related to this... Has this issue been fixed?

jbroadway commented 9 years ago

Ah yes, it has actually. The parser now looks for an outer <p> around the <span> as well as any <br> tags in the same otherwise empty paragraph.