v5.2.1 – Strip ANSI/OSC escape sequences; fix newline rendering in output - #113
Merged
Conversation
Remote shells emit OSC sequences (e.g. \e]11;#RRGGBB\a for background colour) from startup files even during non-interactive SSH commands. These caused the SSH connectivity test to report "failed" despite a successful connection (trim($output) === 'ok' check failed), and appeared as garbled text in job execution output stored in the DB. New AnsiStripper utility class strips CSI, OSC, and Fe escape sequences. Applied in SshTestEndpoint (before success check and response) and in ExecutionFinishEndpoint (before output is written to execution_log). Also fix newline rendering in output display: detail.php and timeline.php used `break-all` without `whitespace-pre-wrap`; HTML collapses \n to spaces in inline elements. Replaced with `whitespace-pre-wrap break-words`.
The pre-built purged stylesheet did not contain these utility classes; output spans using whitespace-pre-wrap break-words had no effect and newlines were collapsed to spaces in dashboard, detail, and timeline views.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AnsiStripperentfernt CSI/OSC/Fe-Sequenzen vor dem Success-Checkexecution_logenthielt ANSI/OSC-Escape-Sequenzen — Strip wird jetzt inExecutionFinishEndpointbeim Einlesen angewendetwhitespace-pre-wrap break-wordsersetztbreak-all; fehlende CSS-Regeln intailwind.cssergänztTest plan