[DEFECT] Key/Value pair not properly escaping things like \t in current content edit screen.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
Using the current content edit screen, when adding information to a Key/Value pair, if there happens to be a tab character copied into the value, when publishing an "Invalid JSON" error appears.
Note: This isn't happening in the new Content Edit screen beta.
Steps to Reproduce
https://github.com/user-attachments/assets/48e30784-f88d-4674-8929-20ce2c968e30
In an evergreen demo environment using the current content edit screen, not the beta..
- Go to Content Types
- Create a new Content Type
- Add a Title Field
- Add a Key/Value Pair Field.
- Save the content type.
- Go to the Content Search screen.
- Create a new contentlet of the new content type.
- In a new TextEdit window, type in a few random characters and then press tab.
- Cmd/Ctrl+A to select everything including the tab space and copy.
- Add in a title, and a key/value pair, pasting the copied value into the value field.
- Try publishing.
Acceptance Criteria
Have the Key/Value field in the current content edit screen correctly escape things like tab characters such as \t
dotCMS Version
Current evergreen. 26.01.05-01
Severity
Medium - Some functionality impacted
Links
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the problem in the current, non-beta content edit screen using the listed steps, then trace how the Key/Value field serializes pasted values. Done means a value containing a tab character publishes successfully without an "Invalid JSON" error; the payload names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- content, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100