+2008-04-02 Benjamin Mack <benni@typo3.org>
+
+ * Fixed bug #7961: headListTags in class.t3lib_parsehtml_proc.php are hardcoded (Thanks to Steffen Kamper)
+
2008-04-01 Ingo Renner <ingo@typo3.org>
* Release of TYPO3 4.2.0RC1
2008-04-01 Ingo Renner <ingo@typo3.org>
* Release of TYPO3 4.2.0RC1
class t3lib_parsehtml_proc extends t3lib_parsehtml {
// Static:
class t3lib_parsehtml_proc extends t3lib_parsehtml {
// Static:
- var $headListTags = 'PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL,DD'; // List of tags for these elements
+ var $blockElementList = 'PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL,DD'; // List of tags for these elements
// Internal, static:
var $recPid = 0; // Set this to the pid of the record manipulated by the class.
// Internal, static:
var $recPid = 0; // Set this to the pid of the record manipulated by the class.
// Init:
$this->procOptions = $thisConfig['proc.'];
$this->preserveTags = strtoupper(implode(',',t3lib_div::trimExplode(',',$this->procOptions['preserveTags'])));
// Init:
$this->procOptions = $thisConfig['proc.'];
$this->preserveTags = strtoupper(implode(',',t3lib_div::trimExplode(',',$this->procOptions['preserveTags'])));
+
+ // dynamic configuration of blockElementList
+ if ($this->procOptions['blockElementList']) {
+ $this->blockElementList = $this->procOptions['blockElementList'];
+ }
+
// Get parameters for rte_transformation:
$p = $this->rte_p = t3lib_BEfunc::getSpecConfParametersFromArray($specConf['rte_transform']['parameters']);
// Get parameters for rte_transformation:
$p = $this->rte_p = t3lib_BEfunc::getSpecConfParametersFromArray($specConf['rte_transform']['parameters']);
if ($this->TS_transform_db_safecounter<0) return $value;
// Split the content from RTE by the occurence of these blocks:
if ($this->TS_transform_db_safecounter<0) return $value;
// Split the content from RTE by the occurence of these blocks:
- $blockSplit = $this->splitIntoBlock('TABLE,BLOCKQUOTE,'.($this->procOptions['preserveDIVSections']?'DIV,':'').$this->headListTags,$value);
+ $blockSplit = $this->splitIntoBlock('TABLE,BLOCKQUOTE,'.($this->procOptions['preserveDIVSections']?'DIV,':'').$this->blockElementList,$value);
$cc=0;
$aC = count($blockSplit);
$cc=0;
$aC = count($blockSplit);
function TS_transform_rte($value,$css=0) {
// Split the content from Database by the occurence of these blocks:
function TS_transform_rte($value,$css=0) {
// Split the content from Database by the occurence of these blocks:
- $blockSplit = $this->splitIntoBlock('TABLE,BLOCKQUOTE,TYPOLIST,TYPOHEAD,'.($this->procOptions['preserveDIVSections']?'DIV,':'').$this->headListTags,$value);
+ $blockSplit = $this->splitIntoBlock('TABLE,BLOCKQUOTE,TYPOLIST,TYPOHEAD,'.($this->procOptions['preserveDIVSections']?'DIV,':'').$this->blockElementList,$value);
// Traverse the blocks
foreach($blockSplit as $k => $v) {
// Traverse the blocks
foreach($blockSplit as $k => $v) {
} else { // NON-block:
$nextFTN = $this->getFirstTagName($blockSplit[$k+1]);
$singleLineBreak = $blockSplit[$k]==chr(10);
} else { // NON-block:
$nextFTN = $this->getFirstTagName($blockSplit[$k+1]);
$singleLineBreak = $blockSplit[$k]==chr(10);
- if (t3lib_div::inList('TABLE,BLOCKQUOTE,TYPOLIST,TYPOHEAD,'.($this->procOptions['preserveDIVSections']?'DIV,':'').$this->headListTags,$nextFTN)) { // Removing linebreak if typolist/typohead
+ if (t3lib_div::inList('TABLE,BLOCKQUOTE,TYPOLIST,TYPOHEAD,'.($this->procOptions['preserveDIVSections']?'DIV,':'').$this->blockElementList,$nextFTN)) { // Removing linebreak if typolist/typohead
$blockSplit[$k] = ereg_replace(chr(10).'[ ]*$','',$blockSplit[$k]);
}
// If $blockSplit[$k] is blank then unset the line. UNLESS the line happend to be a single line break.
$blockSplit[$k] = ereg_replace(chr(10).'[ ]*$','',$blockSplit[$k]);
}
// If $blockSplit[$k] is blank then unset the line. UNLESS the line happend to be a single line break.