[PR #20211] [CLOSED] fix: Remove trailing spaces added to prompts after sending #25505

Closed
opened 2026-04-20 05:58:04 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20211
Author: @Classic298
Created: 12/27/2025
Status: Closed

Base: devHead: fix-extra-space


📝 Commits (2)

  • 0b1889f Update RichTextInput.svelte
  • ef73a8e Update RichTextInput.svelte

📊 Changes

1 file changed (+1 additions, -5 deletions)

View changed files

📝 src/lib/components/common/RichTextInput.svelte (+1 -5)

📄 Description

fix: Remove trailing spaces added to prompts after sending

Fixes #20198

TurndownService was using the default br option which converts <br> tags to " \n" (two trailing spaces + newline). This caused extra spaces to appear in user prompts when editing or copying messages that contained paragraph breaks.

Changed TurndownService config to use br: '\n' to convert line breaks without adding trailing spaces.

Fixed

  • Extra trailing spaces being added to user prompts containing double-newlines when clicking Edit or Copy

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/20211 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 12/27/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix-extra-space` --- ### 📝 Commits (2) - [`0b1889f`](https://github.com/open-webui/open-webui/commit/0b1889f26ebb61bd616ecc96c87ebce2cc1ac861) Update RichTextInput.svelte - [`ef73a8e`](https://github.com/open-webui/open-webui/commit/ef73a8e277d0d0e1f21164b27e9aa213e474c57a) Update RichTextInput.svelte ### 📊 Changes **1 file changed** (+1 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/common/RichTextInput.svelte` (+1 -5) </details> ### 📄 Description # fix: Remove trailing spaces added to prompts after sending Fixes #20198 TurndownService was using the default `br` option which converts `<br>` tags to `" \n"` (two trailing spaces + newline). This caused extra spaces to appear in user prompts when editing or copying messages that contained paragraph breaks. Changed TurndownService config to use `br: '\n'` to convert line breaks without adding trailing spaces. ### Fixed - Extra trailing spaces being added to user prompts containing double-newlines when clicking Edit or Copy ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 05:58:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#25505