Skip to content

Fix: Support displaying newline characters in telemetry string values#3373

Closed
ryanmelt-agent wants to merge 1 commit into
OpenC3:mainfrom
ryanmelt-agent:fix/issue-154-newline-display
Closed

Fix: Support displaying newline characters in telemetry string values#3373
ryanmelt-agent wants to merge 1 commit into
OpenC3:mainfrom
ryanmelt-agent:fix/issue-154-newline-display

Conversation

@ryanmelt-agent
Copy link
Copy Markdown

Summary

Telemetry string values containing newline (and other special whitespace) characters were silently truncated in the packet viewer and other single-line displays. In TEXTBOX screen widgets, newlines weren't rendered as actual line breaks.

Changes

FormatValueBase.js

  • In formatValueBase(), when returning a plain string value, escape special whitespace characters:
    • \n\n (visible escape sequence)
    • \r\r
    • \t\t
    • \r\n\r\n
  • Widgets can opt out by setting escapeSpecialCharacters: false in their data().

TextboxWidget.vue

  • Sets escapeSpecialCharacters: false so actual newline characters in telemetry values are preserved and rendered as real line breaks inside the v-textarea.

Testing

  • A telemetry string value like "line1\nline2" now shows as line1\nline2 in the packet viewer (escaped, no truncation).
  • The same value in a TEXTBOX widget renders with line2 on its own line below line1.

Fixes #154

In packet viewer and other single-line value displays, embedded newlines
in telemetry strings are now shown as visible \n escape sequences rather
than silently truncating the display. \r and \t are similarly escaped.

In TEXTBOX screen widgets, actual newlines are preserved so the v-textarea
renders them as real line breaks, splitting the value across multiple rows.

The opt-out is a data property (escapeSpecialCharacters: false) on the
widget, keeping FormatValueBase generic for future multi-line widgets.

Fixes OpenC3#154

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
8 New issues

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@ryanmelt
Copy link
Copy Markdown
Member

dup of #3376

@ryanmelt ryanmelt closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support displaying newline characters in telemetry string values

3 participants