Skip to content

[DEFECT] Key/Value pair not properly escaping things like \t in current content edit screen. #34284

@nathan-hildebrandt

Description

@nathan-hildebrandt

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

keyvalueescape.mp4

In an evergreen demo environment using the current content edit screen, not the beta..

  1. Go to Content Types
  2. Create a new Content Type
  3. Add a Title Field
  4. Add a Key/Value Pair Field.
  5. Save the content type.
  6. Go to the Content Search screen.
  7. Create a new contentlet of the new content type.
  8. In a new TextEdit window, type in a few random characters and then press tab.
  9. Cmd/Ctrl+A to select everything including the tab space and copy.
  10. Add in a title, and a key/value pair, pasting the copied value into the value field.
  11. 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

https://helpdesk.dotcms.com/a/tickets/34478

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Next 2-4 Sprints

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions