src/Contao/Event/Subscriber.php
private static function renderTextAreaReadable(RenderReadablePropertyValueEvent $event, $property, $extra, $value)
    {
        if ((empty($extra['allowHtml']) && empty($extra['preserveTags']))
            || (null !== $event->getRendered())
            || ('textarea' !== $property->getWidgetType())) {
            return;
        }

        $event->setRendered(\nl2br_html5(StringUtil::specialchars($value)));
    }
private static function renderTextAreaReadable(RenderReadablePropertyValueEvent $event, $property, $extra, $value)
    {
        if ((empty($extra['allowHtml']) && empty($extra['preserveTags']))
            || (null !== $event->getRendered())
            || ('textarea' !== $property->getWidgetType())) {
            return;
        }

        $event->setRendered(\nl2br_html5(StringUtil::specialchars($value)));
    }
private static function renderTextAreaReadable ( RenderReadablePropertyValueEvent $ event , $ property , $ extra , $ value ) { if ( ( empty ( $ extra [ 'allowHtml' ] ) && empty ( $ extra [ 'preserveTags' ] ) ) || ( null !== $ event -> getRendered ( ) ) || ( 'textarea' !== $ property -> getWidgetType ( ) ) ) { return ; } $ event -> setRendered ( \ nl2br_html5 ( StringUtil :: specialchars ( $ value ) ) ) ; }
Render a string if not allow html or preserve tags is given.

@param RenderReadablePropertyValueEvent $event    The event to store the value to.
@param PropertyInterface                $property The property for render it.
@param array                            $extra    The extra data from the property.
@param string                           $value    The value to format.

@return void
Render a string if not allow html or preserve tags is given .