webots icon indicating copy to clipboard operation
webots copied to clipboard

webots.min.js: ANSI escape code not processed when printing on the console

Open stefaniapedrazzi opened this issue 5 years ago • 1 comments

ANSI escape codes are handled in the Webots console but not in the webots.min.js console.

Steps to Reproduce

  1. Stream the camera.wbt
  2. Connect with the streaming_viewer/index.html
  3. Check the text printed in the console

Instead of changing the color of the text, the ANSI escape codes are written as text in the console

[camera] Looks like I found a [32mgreen[0m blob.

[camera] Looks like I found a [34mblue[0m blob.

stefaniapedrazzi avatar Aug 20 '19 09:08 stefaniapedrazzi

Currently, there is no console in the in the web interface. Not sure when and if it is planned to add it back. So I will postpone this because it is something we would like to test when a console is available.

However, I checked in the browser console:

  • in Chrome it works correctly
  • in Firefox the ANSI escape code are not processed

stefaniapedrazzi avatar Jun 20 '22 09:06 stefaniapedrazzi

Fixed in #5119.

stefaniapedrazzi avatar Oct 25 '22 07:10 stefaniapedrazzi