You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace "echo <script>..." by Html::scriptBlock() instructions - #26318
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Refactor
Updated script rendering across forms, installation and update pages, validation views, API documentation, the marketplace, reservations, and rule lists.
Existing page behavior and displayed content remain unchanged.
The changes replace manually assembled script elements with Html::scriptBlock() or Html::script() across forms, views, controllers, and installation pages. Module and import-map script types are specified through ScriptType. The supplied summaries report no changes to the existing JavaScript behavior.
Suggested reviewers:cedric-anne, trasher
Merge Risk: Minimal · up to 1de05
This change moves script output to a shared helper so a CSP nonce can be added later. No behavior regression has been identified, so it is ready to merge after normal checks.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracted from #26020 for easier review.
CSP require us to add a "nonce" property to every script tags.
The nonce will be added inside
Html::scriptBlock()/Html::script()so we must make sure every "echo-ed" script tag is generated by that method.