[PR #12974] [MERGED] fix: improve international character handling in prompt commands #46116

Closed
opened 2026-04-29 20:47:15 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/12974
Author: @holmlund
Created: 4/17/2025
Status: Merged
Merged: 4/19/2025
Merged by: @tjbck

Base: devHead: fix/prompts-international


📝 Commits (1)

  • 9f8b94e fix: improve international character handling in prompt commands

📊 Changes

2 files changed (+26 additions, -3 deletions)

View changed files

📝 src/lib/components/workspace/Prompts/PromptEditor.svelte (+12 -3)
📝 src/lib/utils/index.ts (+14 -0)

📄 Description

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.

Before submitting, make sure you've checked the following:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests to validate the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
    • fix: Bug fix or error correction

Changelog Entry

Description

This PR fixes two long‑standing Prompt Editor pain points:

  1. International characters in titles (å, ä, ö, é, ñ, etc.) now auto‑convert to safe ASCII in the Command field instead of triggering validation errors.
  2. Manual command overrides survive subsequent title edits; once a user has typed in the command box, the auto‑generator backs off.

Together these changes let non‑English users create and tweak prompts without fighting the editor.

Added

  • New slugify utility function in src/lib/utils/index.ts for proper international character handling
  • State tracking for manual command edits in PromptEditor.svelte

Changed

  • Updated command generation logic in PromptEditor.svelte to use the new slugify function
  • Modified command update behavior to preserve manual edits

Deprecated

  • N/A

Removed

  • N/A

Fixed

  • Fixed validation errors when using international characters in prompt titles
  • Fixed manual command overrides being overwritten by title changes
  • Improved handling of accented characters (e.g. å, ä, ö, é, ñ)

Security

  • N/A

Breaking Changes

  • N/A

Additional Information

Screenshots or Videos

Old

prompt_int

New

prompt_int2


🔄 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/12974 **Author:** [@holmlund](https://github.com/holmlund) **Created:** 4/17/2025 **Status:** ✅ Merged **Merged:** 4/19/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix/prompts-international` --- ### 📝 Commits (1) - [`9f8b94e`](https://github.com/open-webui/open-webui/commit/9f8b94e45fbc9f3fcd8ed3ff507cd1ed143bbb91) fix: improve international character handling in prompt commands ### 📊 Changes **2 files changed** (+26 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/workspace/Prompts/PromptEditor.svelte` (+12 -3) 📝 `src/lib/utils/index.ts` (+14 -0) </details> ### 📄 Description # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. **Before submitting, make sure you've checked the following:** - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Provide a concise description of the changes made in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [x] **Testing:** Have you written and run sufficient tests to validate the changes? - [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [x] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: - **fix**: Bug fix or error correction # Changelog Entry ### Description This PR fixes two long‑standing Prompt Editor pain points: 1. **International characters in titles** (å, ä, ö, é, ñ, etc.) now auto‑convert to safe ASCII in the **Command** field instead of triggering validation errors. 2. **Manual command overrides** survive subsequent title edits; once a user has typed in the command box, the auto‑generator backs off. Together these changes let non‑English users create and tweak prompts without fighting the editor. ### Added - New `slugify` utility function in `src/lib/utils/index.ts` for proper international character handling - State tracking for manual command edits in `PromptEditor.svelte` ### Changed - Updated command generation logic in `PromptEditor.svelte` to use the new `slugify` function - Modified command update behavior to preserve manual edits ### Deprecated - N/A ### Removed - N/A ### Fixed - Fixed validation errors when using international characters in prompt titles - Fixed manual command overrides being overwritten by title changes - Improved handling of accented characters (e.g. å, ä, ö, é, ñ) ### Security - N/A ### Breaking Changes - N/A --- ### Additional Information - **Closes:** #12973 ### Screenshots or Videos ## Old ![prompt_int](https://github.com/user-attachments/assets/29af4402-6e4f-485b-adc5-3fcba184447e) ## New ![prompt_int2](https://github.com/user-attachments/assets/ae2a798c-898e-421c-a18e-40ab050923fb) --- <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-29 20:47:15 -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#46116