Skip to content

refactor(tinymce): use .to_json for JS configuration objects#3755

Open
tvdeyen wants to merge 1 commit intomainfrom
refactor-tinymce-setup-to-json
Open

refactor(tinymce): use .to_json for JS configuration objects#3755
tvdeyen wants to merge 1 commit intomainfrom
refactor-tinymce-setup-to-json

Conversation

@tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Mar 16, 2026

What is this pull request for?

Build tinyMCEPreInit and Alchemy.TinymceDefaults as Ruby hashes and serialize them with .to_json instead of interpolating individual values into hand-crafted JS objects. This removes ERB control flow from inside script tags and resolves herb-lint erb-no-unsafe-script-interpolation and erb-no-statement-in-script warnings.

Checklist

Build tinyMCEPreInit and Alchemy.TinymceDefaults as Ruby hashes and
serialize them with .to_json instead of interpolating individual values
into hand-crafted JS objects. This removes ERB control flow from inside
script tags and resolves herb-lint erb-no-unsafe-script-interpolation
and erb-no-statement-in-script warnings.
@tvdeyen tvdeyen added this to the 8.2 milestone Mar 16, 2026
@tvdeyen tvdeyen requested a review from a team as a code owner March 16, 2026 17:25
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