Skip to content

fix(sdk): preserve unquoted escapes in inline styles - #5246

Open
user-github-me wants to merge 1 commit into
heygen-com:mainfrom
user-github-me:fix/sdk-inline-css-escapes
Open

user-github-me wants to merge 1 commit into
heygen-com:mainfrom
user-github-me:fix/sdk-inline-css-escapes

Conversation

@user-github-me

Copy link
Copy Markdown

An inline CSS custom property such as --label: alpha\;beta is valid, but changing an unrelated color through the SDK splits at its escaped semicolon and rewrites the value. Escaped quotes and parentheses can make the scanner swallow later declarations, leaving undo unable to restore color.

Handle an escaped character before checking quote state in the existing inline-style scanner. This keeps escaped punctuation inside an unquoted value while an escaped backslash followed by an ordinary semicolon still ends the declaration.

Validation:

  • Eight new regressions fail on main (four scanner cases and four public edit/undo/redo/reopen/override cases); all 616 SDK tests pass after the fix, including an escaped-backslash control.
  • Built SDK in Chrome 152, real iframe synchronization: five values survive edit, undo, redo, iframe reload, and serialized reopening; baseline reproduces custom-property corruption and missing undo restoration.
  • SDK build, repository lint, changed-file lint and formatting pass.
  • Optional typecheck:examples reports existing examples/test typing errors; its output is byte-identical on unchanged main.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant