webots
webots copied to clipboard
webots.min.js: ANSI escape code not processed when printing on the console
ANSI escape codes are handled in the Webots console but not in the webots.min.js console.
Steps to Reproduce
- Stream the
camera.wbt
- Connect with the
streaming_viewer/index.html
- 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.
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
Fixed in #5119.