[GH-ISSUE #7383] Closing markdown tag \\\` in input box does not preserve new lines in fixed format text #85467

Closed
opened 2026-05-15 10:06:44 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @levicki on GitHub (Nov 26, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7383

Bug Report


Installation Method

git clone https://github.com/open-webui/open-webui.git
npm i
npm run build
cd backend
python -m venv venv
venv\scripts\activate
pip install -r requirements.txt
start_windows.bat

Environment

  • Open WebUI Version: v0.4.5

  • Ollama (if applicable): v0.4.5

  • Operating System: Windows 11 23H2 Version 10.0.22631.4541

  • Browser (if applicable): Brave Browser 1.73.91 Chromium: 131.0.6778.85 (Official Build) (64-bit)

Confirmation:

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

Expected Behavior:

When writing a question for the model I expect that markdown is supported (specifically ``` to denote fixed formatting of the following text block). Rationale for this expectation is that it works on ChatGPT to which this UI seems to be almost identical to.

Actual Behavior:

Upon entering the closing ``` the text is reformatted and newlines are lost.

Description

Bug Summary:

Closing the ``` markdown tag in text input box leads to text being reformatted with the loss of newline characters.

Reproduction Details

Steps to Reproduce:

  1. Start a markdown block with ```
  2. Press Shift+Enter to go to the next line
  3. Paste a code block
  4. Press Shift+Enter to go to the next line
  5. End the markdown block with ```

Logs and Screenshots

Screenshots/Screen Recordings (if applicable):

Before entering the closing ```:
image

After entering the closing ```:
image

Additional Information

N/A

Originally created by @levicki on GitHub (Nov 26, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/7383 # Bug Report --- ## Installation Method ``` git clone https://github.com/open-webui/open-webui.git npm i npm run build cd backend python -m venv venv venv\scripts\activate pip install -r requirements.txt start_windows.bat ``` ## Environment - **Open WebUI Version:** v0.4.5 - **Ollama (if applicable):** v0.4.5 - **Operating System:** Windows 11 23H2 Version 10.0.22631.4541 - **Browser (if applicable):** Brave Browser 1.73.91 Chromium: 131.0.6778.85 (Official Build) (64-bit) **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. - [ ] 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 writing a question for the model I expect that markdown is supported (specifically \`\`\` to denote fixed formatting of the following text block). Rationale for this expectation is that it works on ChatGPT to which this UI seems to be almost identical to. ## Actual Behavior: Upon entering the closing \`\`\` the text is reformatted and newlines are lost. ## Description **Bug Summary:** Closing the \`\`\` markdown tag in text input box leads to text being reformatted with the loss of newline characters. ## Reproduction Details **Steps to Reproduce:** 1. Start a markdown block with \`\`\` 2. Press Shift+Enter to go to the next line 3. Paste a code block 4. Press Shift+Enter to go to the next line 5. End the markdown block with \`\`\` ## Logs and Screenshots **Screenshots/Screen Recordings (if applicable):** Before entering the closing \`\`\`: ![image](https://github.com/user-attachments/assets/bc02ffb8-0053-4411-8cb7-80baf74a641d) After entering the closing \`\`\`: ![image](https://github.com/user-attachments/assets/e43d08c7-a90f-41e3-9727-ecebad19a526) ## Additional Information N/A
Author
Owner

@tjbck commented on GitHub (Nov 26, 2024):

#6973

<!-- gh-comment-id:2501387468 --> @tjbck commented on GitHub (Nov 26, 2024): #6973
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#85467