Skip to content

fix: escape quotes and backslashes in titles and string defaults - #201

Open
singhharsh1708 wants to merge 1 commit into
pasteurlabs:mainfrom
singhharsh1708:fix/escape-titles-and-defaults
Open

singhharsh1708 wants to merge 1 commit into
pasteurlabs:mainfrom
singhharsh1708:fix/escape-titles-and-defaults

Conversation

@singhharsh1708

Copy link
Copy Markdown
Contributor

Relevant issue or PR

Follow-up to #197, which escaped descriptions.

Description of changes

Field titles, string defaults, UDF titles and the page title were still written into the generated app's string literals as-is, so a " or \ in any of them broke the app (SyntaxError) or changed the text. They now go through the same escaping as descriptions, moved into an escape_str macro.

Testing done

New test renders a string field and a number field with a quote or backslash in the title and default, parses the app and checks the text survives. It fails on main and passes with the fix.

@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.64%. Comparing base (b733a89) to head (23538cd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #201   +/-   ##
=======================================
  Coverage   86.64%   86.64%           
=======================================
  Files           5        5           
  Lines         322      322           
  Branches       36       36           
=======================================
  Hits          279      279           
  Misses         39       39           
  Partials        4        4           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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