fix: support Unicode characters in form field names#38138
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #38138 +/- ##
==========================================
- Coverage 85.38% 85.33% -0.06%
==========================================
Files 5119 4964 -155
Lines 262662 258334 -4328
Branches 50081 49023 -1058
==========================================
- Hits 224281 220452 -3829
+ Misses 34092 33593 -499
Partials 4289 4289
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Markdown form component in the web frontend to accept Unicode characters in form field name attributes, so non-ASCII field names (e.g., Chinese, accented Latin) are not filtered out as “unsafe”.
Changes:
- Expand the “safe field name” regex to allow Unicode letters/marks/numbers.
- Add a unit test ensuring Unicode-named fields are included in JSON submission output.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| web/app/components/base/markdown-blocks/form.tsx | Updates the safe-name validation regex to support Unicode field names. |
| web/app/components/base/markdown-blocks/tests/form.spec.tsx | Adds a test covering Unicode field-name submission in JSON mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> (cherry picked from commit d2216fe)
Important
Fixes #<issue number>.Summary
Fixes inner ticket 2944
Screenshots
Checklist
make lint && make type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods