[TYPO3-english] problem with rendering content from RTE field
Tomaz Zaman
tomaz at optiss.si
Mon Aug 17 12:08:10 CEST 2009
Jigal van Hemert wrote:
>> $subMarkers['###FIELD_' . strtoupper($field) . '###'] =
>> $cObj->stdWrap(htmlspecialchars($value), $this->conf['listView.'][$field
>> . '_stdWrap.']);
>
> htmlspecialchars will render the html in $value useless, so you don't want
> that in this case. pi_RTEcssText() is the right funtion, but should be
> used instead of htmlspecialchars:
>
> $subMarkers['###FIELD_' . strtoupper($field) . '###'] =
> $this->pi_RTEcssText($value);
>
> If you want to apply stdWrap to it:
>
> $subMarkers['###FIELD_' . strtoupper($field) . '###'] =
> $cObj->stdWrap($this->pi_RTEcssText($value),
> $this->conf['listView.'][$field
>> . '_stdWrap.']);
>
> You should decide if a particular field is an RTE field or a 'normal' field.
>
Working fine, thank you! I didn't even notice the htmlspecialchars in
there :S
Tomaz Zaman
More information about the TYPO3-english
mailing list