[Typo3] <p> in <td> how to remove?
Wim Cruysberghs - thuis
wim.cruysberghs at telenet.be
Wed Apr 27 10:40:47 CEST 2005
No sorry, i think it is here you have to find it:
File: t3lib/class.t3lib_parsehtml_proc
Lines: 1161 - 1202
If you change the value of $dT in the function setDivTags-declaration to
something else, maybe you get rid of the <p>-problem...
/**
* Converts all lines into <div></div>/<p></p>-sections (unless the line is
a div-section already)
* For processing of content going FROM database TO RTE.
*
* @param string Value to convert
* @param string Tag to wrap with. Either "p" or "div" should it be.
Lowercase preferably.
* @return string Processed value.
* @see divideIntoLines()
*/
function setDivTags($value,$dT='p') {
// First, setting configuration for the HTMLcleaner function. This will
process each line between the <div>/<p> section on their way to the RTE
$keepTags = $this->getKeepTags('rte');
$kUknown = $this->procOptions['dontProtectUnknownTags_rte'] ? 0 :
'protect'; // Default: remove unknown tags.
$hSC = $this->procOptions['dontHSC_rte'] ? 0 : 1; // Default: re-convert
literals to characters (that is < to <)
$convNBSP = !$this->procOptions['dontConvAmpInNBSP_rte']?1:0;
// Divide the content into lines, based on chr(10):
$parts = explode(chr(10),$value);
foreach($parts as $k => $v) {
// Processing of line content:
if (!strcmp(trim($parts[$k]),'')) { // If the line is blank, set it to
$parts[$k]=' ';
} else { // Clean the line content:
$parts[$k]=$this->HTMLcleaner($parts[$k],$keepTags,$kUknown,$hSC);
if ($convNBSP) $parts[$k]=str_replace('&nbsp;',' ',$parts[$k]);
}
// Wrapping the line in <$dT> is not already wrapped:
$testStr = strtolower(trim($parts[$k]));
if (substr($testStr,0,4)!='<div' || substr($testStr,-6)!='</div>') {
if (substr($testStr,0,2)!='<p' || substr($testStr,-4)!='</p>') {
// Only set p-tags if there is not already div or p tags:
$parts[$k]='<'.$dT.'>'.$parts[$k].'</'.$dT.'>';
}
}
}
// Implode result:
return implode(chr(10),$parts);
}
greetings,
wim
-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de]On Behalf Of Wim
Cruysberghs - thuis
Sent: mercredi 27 avril 2005 1:28
To: 'TYPO3 English'
Subject: RE: [Typo3] <p> in <td> how to remove?
Hey Guys,
In the tslib/class.tslib_content-file, the <p> seems to inserted in the
following lines:
3639 until 3641:
if ($cfg['HTMLtableCells.'][$cc.'.']['callRecursive'] ||
(!isset($cfg['HTMLtableCells.'][$cc.'.']['callRecursive']) &&
$cfg['HTMLtableCells.']['default.']['callRecursive']))
{if ($cfg['HTMLtableCells.']['addChr10BetweenParagraphs'])
$colParts[$kkk]=str_replace('</p><p>','</p>'.chr(10).'<p>',$colParts[$kkk]);
$colParts[$kkk] = $this->parseFunc($colParts[$kkk], $conf);
}
Maybe you could try to take it out here?
Greetings,
Wim
-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de]On Behalf Of ben van
't ende [netcreators]
Sent: mardi 26 avril 2005 14:45
To: typo3-english at lists.netfielders.de
Subject: Re: [Typo3] <p> in <td> how to remove?
Rob De Vries wrote:
> Hey listers
>
> How do I get rid of <p>'s in my tables?
> I make a table with the table content object (not with the rte) and i
> have noticed that all content is embedded in <p> tags. what I do not
> like :')
>
> any suggestions on how to remove them?
>
> I use css_styled content
Hi Rob,
It is my guess that it is hardcoded. I have the same issue. Any TS for this?
gRTZ
ben
--
netcreators::creation and innovation
www.netcreators.nl - www.typo3.nl
_______________________________________________
Typo3-english mailing list
Typo3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
_______________________________________________
Typo3-english mailing list
Typo3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
More information about the TYPO3-english
mailing list