Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-71515] Make codemirror-config a valid JSON #1381

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

yaroslavafenkin
Copy link
Contributor

Needed before jenkinsci/jenkins#6867 can get merged.

codemirror-config attribute is expected to be a valid JSON except the start and end bracket as per https://github.com/jenkinsci/jenkins/blob/cd3b1517e7a553fd6fcf39e25c4bd1e18fbe39de/core/src/main/resources/lib/form/textarea.jelly#L70-L73.

In the upstream change JSON#parse is used instead of eval to transform the codemirror-config into a JSON object. JSON#parse cannot parse function attributes, hence the drop of onBlur handler in this PR. There seems to be no need for it because this code re-adds it.

Testing done

Tested interactively against jenkinsci/jenkins#6867. Created a freestyle job, added the Process Job DSLs build step. Made sure codemirror-config is parsed correctly, and no errors are thrown in the developer console.

Submitter checklist

@yaroslavafenkin yaroslavafenkin requested a review from a team as a code owner August 16, 2023 13:41
@basil basil merged commit 52cc3e3 into jenkinsci:master Aug 27, 2024
15 checks passed
@basil basil added the internal label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants