Skip to content

Escape serialized draft field values before parsing - #8

Open
mickobizzle wants to merge 1 commit into
agiletortoise:mainfrom
mickobizzle:codex/fix-delimiter-escaping
Open

Escape serialized draft field values before parsing#8
mickobizzle wants to merge 1 commit into
agiletortoise:mainfrom
mickobizzle:codex/fix-delimiter-escaping

Conversation

@mickobizzle

Copy link
Copy Markdown

Fixes #6.

Summary:

  • replace raw delimiter-based field serialization with escaping for <<SEP>>, <<END>>, and backslashes
  • centralize draft serialization in one AppleScript helper to keep all read paths consistent
  • add regression tests that cover separator-containing content in both single-draft and multi-draft parsing
  • add a npm test script so the parser behavior is easy to verify locally

Why:
Draft content is user-controlled input. When a draft body or title contains the same sentinel strings the server uses internally, the current parser can split one draft into fake fields or fake records before the result reaches the model.

Validation:

  • npm test
  • AppleScript smoke test for the escaping helper via osascript

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.

Escape serialized draft field values before parsing

1 participant