Skip to content

Does not preserve carriage return #11

@Theosakamg

Description

@Theosakamg

Console display :

$ ./app/console  project:ota:update
Check if new firmware is available...
Found embeded Firmware for Xxxxx on 0.2.6 (206)

But actualy Html display :

<span style="background-color: black;color: yellow;display: block;">Check if new firmware is available...</span><span style="background-color: black;color: white;display: block;"></span><span style="background-color: black;color: yellow;display: block;">Found embeded Firmware for Xxxxx (heater) on 0.2.6 (206)</span><span style="background-color: black; color: white"></span>

Html should be display :

<span style="background-color: black;color: yellow;">Check if new firmware is available...</span><br/><span style="background-color: black;color: yellow;">Found embeded Firmware for Xxxxx (heater) on 0.2.6 (206)</span>

my code :
In ContainerAwareCommand

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('<comment>Check if new firmware is available...</comment>');
        $output->writeln("<comment>Found Alfred embeded Firmware for $board  on $ver ($version)</comment>");
    }

In Controller

    public function scanAction()
    {
        $output = new BufferedOutput(OutputInterface::VERBOSITY_NORMAL, true );

... Call my command ...

        // return the output
        $converter = new AnsiToHtmlConverter(); //new SolarizedTheme(), true);
        $content = $converter->convert($output->fetch());

        $this->addFlash('sonata_flash_success', "$content");
    }

With :

  • Debian Testing
  • Php 7.0
  • Symfony 2.8
  • Sonata Admin 3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions