src/Sulu/Bundle/MarkupBundle/Listener/MarkupListener.php
public function replaceMarkup(FilterResponseEvent $event)
    {
        $request = $event->getRequest();
        $response = $event->getResponse();
        $format = $request->getRequestFormat();
        $content = $response->getContent();

        if (!$content || !array_key_exists($format, $this->markupParser)) {
            return;
        }

        $response->setContent(
            $this->markupParser[$format]->parse($content, $request->getLocale())
        );
    }
public function replaceMarkup(FilterResponseEvent $event)
    {
        $request = $event->getRequest();
        $response = $event->getResponse();
        $format = $request->getRequestFormat();
        $content = $response->getContent();

        if (!$content || !array_key_exists($format, $this->markupParser)) {
            return;
        }

        $response->setContent(
            $this->markupParser[$format]->parse($content, $request->getLocale())
        );
    }
public function replaceMarkup ( FilterResponseEvent $ event ) { $ request = $ event -> getRequest ( ) ; $ response = $ event -> getResponse ( ) ; $ format = $ request -> getRequestFormat ( ) ; $ content = $ response -> getContent ( ) ; if ( ! $ content || ! array_key_exists ( $ format , $ this -> markupParser ) ) { return ; } $ response -> setContent ( $ this -> markupParser [ $ format ] -> parse ( $ content , $ request -> getLocale ( ) ) ) ; }
Parses content of response and set the replaced html as new content.

@param FilterResponseEvent $event
Parses content of response and set the replaced html as new content .