Automattic / Automattic/juice

Custom attributes and single quotes aren't converted properly

Open
#274 4 comments 7 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
3.3k
Forks
233
Avg merge
1d 10h
Merged PRs (30d)
8

Description

`data-sheets-userformat='{"2":5059,"3":[null,0],"4":[null,2,15389148],"9":1,"10":1,"11":4,"12":0,"15":"Calibri"}'`
and
`style='font-family: "Times New Roman"'`
are converted into:
`data-sheets-userformat="{"2":5059,"3":[null,0],"4":[null,2,15389148],"9":1,"10":1,"11":4,"12":0,"15":"Calibri"}"`
and
`style="font-family: "Times New Roman""`

The single quotes `'` are converted into double quotes `"`, which break the html.

Contributor guide

Open the contributing guide

Research direction

Reproduce the conversion using the data-sheets-userformat and style examples in the issue, then trace the HTML attribute parsing or serialization entry point that changes single quotes. Done means both attributes remain valid HTML with their embedded JSON and quoted font family intact, and regression coverage verifies these examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.