mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #22693] [CLOSED] fix: sanitize generated plugin ids from titles #26815
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22693
Author: @Fu-Jie
Created: 3/15/2026
Status: ❌ Closed
Base:
dev← Head:fix/sanitize-plugin-id-from-title📝 Commits (1)
0a1aaa7fix: sanitize plugin ids derived from titles📊 Changes
8 files changed (+48 additions, -6 deletions)
View changed files
➕
demos/new_create.png(+0 -0)➕
demos/new_success.png(+0 -0)➕
demos/old_create.png(+0 -0)➕
demos/old_error.png(+0 -0)📝
src/lib/components/ImportModal.svelte(+3 -2)📝
src/lib/components/admin/Functions/FunctionEditor.svelte(+14 -2)📝
src/lib/components/workspace/Tools/ToolkitEditor.svelte(+13 -2)📝
src/lib/utils/index.ts(+18 -0)📄 Description
Pull Request Checklist
devfixChangelog Entry
Description
When creating Functions or Tools, the frontend previously derived ids with a very simple
name.replace(/\s+/g, '_').toLowerCase()rule. Titles likexxx😄kept unsupported characters in the generated id, so creation failed later with a misleading backend validation error.This PR makes the frontend sanitize generated ids before submission while keeping the user-facing title unchanged.
Changed
toPluginIdhelper for frontend-generated ids.Fixed
xxx😄now succeeds because the generated id removes the emoji before submission.Additional Information
Manual verification
xxx😄and confirmed the previous flow surfaced the backend error.npm run buildsuccessfully on this branch.Screenshots or Videos
Old behavior while creating a Tool with title
xxx😄:New behavior with the same title after frontend sanitization:
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.