[Typo3] Typo adds <p>&nbsp;</p> after h1 tags

Rodrigo Cea rcea at altamira.cl
Tue May 17 16:27:13 CEST 2005


List,

typo is adding <p>&nbsp;</p> after my <h1> tags, when they're not followed
by normal text  in the RTE.

For instance, if my text looks like this (in code view):

<h1>text>/h1>

the output looks like this

<h1>text>/h1>
<p>&nbsp;</p>

which, needless to say, screws up my design. I am quite sure that there
is no space after the text, and if I change the <h1> tag into <p>, there
is no extra line added.

I think the culprit is this in the
ext/css_styled_content/static/setup.txt file (lines 123-):

nonTypoTagStdWrap.encapsLines {
		encapsTagList = div,p,pre,h1,h2,h3,h4,h5,h6
		remapTag.DIV = P
		nonWrappedTag = P
		innerStdWrap_all.ifEmpty = &nbsp;
		addAttributes.P.class = bodytext
		addAttributes.P.class.setOnly=blank
	}

If I comment this out, the problem disappears, but, obviously enough, my
normal text lines don't get wrapped in <p> tags and all the text runs
together. If I remove "h1,h2,h3" etc. from the second line, the <hX>
tags get wrapped in a <p>.

Is there a way to keep the correct <p> tags without tacking on extra
ones I don't need?

Thanks,

Rodrigo



More information about the TYPO3-english mailing list