Input field unable to handle pasted text (converting to markdown?) #2460

Closed
opened 2025-11-11 15:07:46 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @skerit on GitHub (Oct 25, 2024).

Bug Report

Installation Method

Docker

Environment

  • Open WebUI Version: v0.3.33
  • Operating System: Eandeavouros linux
  • Browser (if applicable): Chromium 130

Confirmation:

  • [x ] I have read and followed all the instructions provided in the README.md.
  • [x ] I am on the latest version of both Open WebUI and Ollama.
  • [x ] I have included the browser console logs.
  • I have included the Docker container logs.
  • [x ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

When I paste something in the input field, I expect it to be pasted as-is.

Actual Behavior:

It's removing all the leading whitespace (unless it's a non-breaking space)
And it's adding some strange markdown formatting

Description

Bug Summary:

The leading whitespaces are removed, weird formatting is added

Reproduction Details

Steps to Reproduce:

Copy some text and paste it into the input field, for example:

test
   test

or even worse:

	"version": {
		"major": 1,
		"minor": 1,
		"patch": 0
	},

Logs and Screenshots

Browser Console Logs:

Docker Container Logs:

Screenshots/Screen Recordings (if applicable):

image
image
image

Additional Information

When formatting text inside the input field manually, leading whitespaces become non-breaking spaces

Originally created by @skerit on GitHub (Oct 25, 2024). # Bug Report ## Installation Method Docker ## Environment - **Open WebUI Version:** v0.3.33 - **Operating System:** Eandeavouros linux - **Browser (if applicable):** Chromium 130 **Confirmation:** - [x ] I have read and followed all the instructions provided in the README.md. - [x ] I am on the latest version of both Open WebUI and Ollama. - [x ] I have included the browser console logs. - [ ] I have included the Docker container logs. - [x ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: When I paste something in the input field, I expect it to be pasted as-is. ## Actual Behavior: It's removing all the leading whitespace (unless it's a non-breaking space) And it's adding some strange markdown formatting ## Description **Bug Summary:** The leading whitespaces are removed, weird formatting is added ## Reproduction Details **Steps to Reproduce:** Copy some text and paste it into the input field, for example: ``` test test ``` or even worse: ``` "version": { "major": 1, "minor": 1, "patch": 0 }, ``` ## Logs and Screenshots **Browser Console Logs:** **Docker Container Logs:** **Screenshots/Screen Recordings (if applicable):** ![image](https://github.com/user-attachments/assets/f4cc9de6-8c1b-40b6-b531-53e07e291460) ![image](https://github.com/user-attachments/assets/127ba6bc-27be-4ff0-af2b-b4b05b947290) ![image](https://github.com/user-attachments/assets/54126ca6-6c62-4cad-83ed-48d24908d3e0) ## Additional Information When formatting text inside the input field manually, leading whitespaces become non-breaking spaces
Author
Owner

@tjbck commented on GitHub (Oct 25, 2024):

image

Fixed on dev!

@tjbck commented on GitHub (Oct 25, 2024): ![image](https://github.com/user-attachments/assets/06d0ab2e-0192-48a2-bf85-b024e7cb6c73) Fixed on dev!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#2460