Output of DomElement in valid HTML without surrounding <p> for lists and tables

According to the Blog CMS_INPUT_DOM - Listoutput without spanning  'p' tags I'd like to have a standard implementation of the DomElement output that differs automatically between lists, tables and normal paragraphs to create valid HTML output. It should work like a router (maybe to different format templates "ul", "p"...) with the result that lists and tables are not longer nested in <p> tags because this is no valid HTML code.

2 Comments
matthiasforberg
Occasional Collector

One possible solution (maybe the easiest, too?) could be, simply to make the format templates "ul" and "table" a "section"-format. By doing so, these element would be handled as block-elements and the output would be valid HTML, without the necessity to remove any p-tags afterwards.

Read more details here (in German):  Listen und Tabellen im DOM als Blockelement behandeln

Peter_Jodeleit
Crownpeak employee
Crownpeak employee

Internal id: 154163