[GH-ISSUE #787] [Issue]: Assistant command parser truncates quoted values and loses newlines #385

Closed
opened 2026-10-20 17:28:16 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @cha1latte on GitHub (May 13, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/787

Originally assigned to: @cha1latte on GitHub.

Summary

Professor Mari's [update_character] commands mishandle text field values in two ways: double quote characters (") truncate the stored field value, and newline characters are not preserved as actual line breaks in the character card editor.

Source: https://discord.com/channels/1417099416812392641/1503831745194360954

Expected behavior

Double quotes inside field values should be stored as normal content without closing or truncating the field value. Newline content submitted through the assistant command should be preserved as actual line breaks when viewed in the character card editor.

Actual behavior

Including a double quote anywhere in the field value truncates the saved value at the first quote and leaves a trailing backslash. For example, She goes by "The Bread Witch" and everyone knows it. saves only She goes by \.

For multi-paragraph content with \n between paragraphs, the card editor either shows literal \n text or stores the content as one unbroken block with the line breaks stripped.

Steps to reproduce

  1. Open a Professor Mari chat.
  2. Ask Mari to update any character text field, such as description.
  3. Include a double quote character (") anywhere in the content, for example She goes by "The Bread Witch" and everyone knows it.
  4. Open the character card editor.
  5. Observe that the field is truncated at the first double quote with a trailing backslash.
  6. Repeat with multi-paragraph content containing \n between paragraphs.
  7. Observe that the editor does not preserve those values as actual line breaks.

Marinara Engine version

Not specified.

Install type

Other

OS + version

macOS, exact version not specified.

Browser or app shell

Zen Browser (Gecko) and Safari PWA. Reporter confirmed the same behavior in both.

Screenshots or video

Not a visual/UI issue.

Logs

Not provided.

Additional context

Reporter notes:

  • The first line of a card being a quote immediately damaged the output.
  • Behavior is consistent whether quotes are paired or unpaired; a single " anywhere in the value triggers the truncation.
  • Suspected cause from reporter: inner " characters are escaped in a way the parser then interprets as the closing field delimiter.
  • Workaround for quotes: use single quotes (') instead of double quotes.
  • No workaround found for newlines except manually adding line breaks in the card editor after the update.
  • Characters confirmed safe: em dashes, equals signs, backticks, angle brackets, pipe characters, single quotes, and long text over 500 characters.

Template check

  • I provided the required summary, behavior, reproduction, and environment details.
  • If this is a visual/UI bug, blank screen, layout issue, mobile/responsive issue, incorrect image or sprite, broken animation, or unexpected error state, I attached screenshots or video.
Originally created by @cha1latte on GitHub (May 13, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/787 Originally assigned to: @cha1latte on GitHub. ## Summary Professor Mari's `[update_character]` commands mishandle text field values in two ways: double quote characters (`"`) truncate the stored field value, and newline characters are not preserved as actual line breaks in the character card editor. Source: https://discord.com/channels/1417099416812392641/1503831745194360954 ## Expected behavior Double quotes inside field values should be stored as normal content without closing or truncating the field value. Newline content submitted through the assistant command should be preserved as actual line breaks when viewed in the character card editor. ## Actual behavior Including a double quote anywhere in the field value truncates the saved value at the first quote and leaves a trailing backslash. For example, `She goes by "The Bread Witch" and everyone knows it.` saves only `She goes by \`. For multi-paragraph content with `\n` between paragraphs, the card editor either shows literal `\n` text or stores the content as one unbroken block with the line breaks stripped. ## Steps to reproduce 1. Open a Professor Mari chat. 2. Ask Mari to update any character text field, such as description. 3. Include a double quote character (`"`) anywhere in the content, for example `She goes by "The Bread Witch" and everyone knows it.` 4. Open the character card editor. 5. Observe that the field is truncated at the first double quote with a trailing backslash. 6. Repeat with multi-paragraph content containing `\n` between paragraphs. 7. Observe that the editor does not preserve those values as actual line breaks. ## Marinara Engine version Not specified. ## Install type Other ## OS + version macOS, exact version not specified. ## Browser or app shell Zen Browser (Gecko) and Safari PWA. Reporter confirmed the same behavior in both. ## Screenshots or video Not a visual/UI issue. ## Logs Not provided. ## Additional context Reporter notes: - The first line of a card being a quote immediately damaged the output. - Behavior is consistent whether quotes are paired or unpaired; a single `"` anywhere in the value triggers the truncation. - Suspected cause from reporter: inner `"` characters are escaped in a way the parser then interprets as the closing field delimiter. - Workaround for quotes: use single quotes (`'`) instead of double quotes. - No workaround found for newlines except manually adding line breaks in the card editor after the update. - Characters confirmed safe: em dashes, equals signs, backticks, angle brackets, pipe characters, single quotes, and long text over 500 characters. ## Template check - [ ] I provided the required summary, behavior, reproduction, and environment details. - [ ] If this is a visual/UI bug, blank screen, layout issue, mobile/responsive issue, incorrect image or sprite, broken animation, or unexpected error state, I attached screenshots or video.
bsakaguchi 2026-10-20 17:28:16 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#385
No description provided.