htmlpluginstypo3fluid

TYPO3 extensions/plugins creating <p> tags in HTML pages


I created an extension and plugin using extension builder which generates some HTML code to a file fileadmin/templates/List.html.This content goes into my web page's template.html as

<f:section name="some-content">
<f:format.html> {some_content} </f:format.html> 
</f:section>

some_content comes from my Typoscript template

some_content < styles.content.get
some_content.select.where = colPos = 1

The plugin is attached from a backend layout

The problem is that in my HTML page I get plugin information in <p> tags

<p class="bodytext">&nbsp;</p>
<p class="bodytext">    <!--  CONTENT ELEMENT, uid:260/list [begin] --></p>
<p class="bodytext">&nbsp;</p><div id="c260" class="csc-default"><p class="bodytext">&nbsp;</p>
<p class="bodytext">        <!--  Plugin inserted: [begin] --></p>
<p class="bodytext">&nbsp;</p>
<p class="bodytext">        <!--  Plugin inserted: [end] --></p>
<p class="bodytext">&nbsp;</p></div><p class="bodytext">    <!--  CONTENT ELEMENT, uid:260/list [end] --></p>
<p class="bodytext">&nbsp;</p>

And this messing up my CSS.


Solution

  • <f:format.html> uses RTEparser to parse the content in it. Each new line will be wrapped with a p-tag.

    Use <f:format.raw> to avoid HTML escaping.