Bug 510577

Summary: Build output of the Build & Run plugin does not display terminal colours
Product: [Applications] kate Reporter: Jack Hill <jackhill3103>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: kare.sars
Priority: NOR    
Version First Reported In: 25.08.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jack Hill 2025-10-13 19:15:27 UTC
SUMMARY
The output tab of the Build & Run plugin does not seem to correctly print terminal colours like \033[95m. If this is not possible in QTextBrowser then at the very least these tags should be stripped before printing the output.

I noticed this problem when running a Bazel build, because Bazel makes good use of terminal colours.

STEPS TO REPRODUCE
1. Set the following line as the build command:
echo "\033[95mFinished building\033[0m"
2. "Build" the target
3. Go to the build output tab

OBSERVED RESULT
\033[95mFinished building\033[0m

in black text

EXPECTED RESULT
Finished building

preferably in the correct colour, but at the very least the colour tags should be stripped.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20251007
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Kernel Version: 6.17.0-2-default (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 Kåre Särs 2025-10-14 08:58:02 UTC
Thanks for the report!

Hmm...
We use basic html for coloring info/warning/error/... and links, so setting a text color should not be impossible. Using the colors from the terminal could clash a bit with the mentioned stuff.

Removing the color tags should be quite easy...