Skip to content

Remove CDATA wrapper for scripts - #26295

Merged
trasher merged 1 commit into
glpi-project:mainfrom
AdrienClairembault:remove-cdata
Nov 12, 2026
Merged

trasher merged 1 commit into
glpi-project:mainfrom
AdrienClairembault:remove-cdata

Conversation

@AdrienClairembault

Copy link
Copy Markdown
Member

Extracted from #26020 to keep its scope smaller and ease reviews.

This wrapper is outdated and does nothing here, I think it can be safely removed.

Deleting it allow us to use Html::scriptBlock to generate the import map (because the import map script must be valid JSON and CDATA breaks it), like this:
image

@AdrienClairembault

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

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.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Powered by Qodo

@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Script blocks are now output without extra newline or CDATA wrapper strings, resulting in cleaner generated HTML.

Html::scriptBlock() no longer wraps script content with newline and CDATA marker strings before generating the script element.

Merge Risk: Minimal · up to 3fc7b

This change drops an outdated CDATA wrapper from generated script blocks so JSON-bearing scripts such as import maps are valid. No concrete merge-blocking risk was identified.

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.

Share

@trasher
trasher merged commit 0493b43 into glpi-project:main Nov 12, 2026
15 checks passed
@AdrienClairembault
AdrienClairembault deleted the remove-cdata branch November 12, 2026 11:58
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.

2 participants