Security: Enable CSP in JS / fix Navigation demo#32852
Merged
dmlvr merged 10 commits intoDevExpress:26_1from Mar 11, 2026
Merged
Security: Enable CSP in JS / fix Navigation demo#32852dmlvr merged 10 commits intoDevExpress:26_1from
dmlvr merged 10 commits intoDevExpress:26_1from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to improve Content Security Policy (CSP) compliance for the Charts/ExportCustomMarkup demo by removing inline style attributes from SVG <text> elements and replacing them with CSS classes. The corresponding CSP allowlist entry for 'unsafe-inline' in style-src is also removed.
Changes:
- Replaced inline SVG
styleattributes with CSS classes (custom_markup_text,custom_markup_text--title,custom_markup_text--subtitle) across all five framework demos (jQuery, React, ReactJs, Vue, Angular). - Added corresponding CSS rules to each framework's stylesheet.
- Removed the
Charts/ExportCustomMarkupentry from the CSP demo allowlist since'unsafe-inline'forstyle-srcis no longer needed.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
apps/demos/utils/server/csp-server.js |
Removes the CSP allowlist entry for ExportCustomMarkup demo |
apps/demos/Demos/Charts/ExportCustomMarkup/jQuery/index.html |
Replaces inline styles on SVG <text> elements with CSS classes |
apps/demos/Demos/Charts/ExportCustomMarkup/jQuery/styles.css |
Adds CSS class definitions for SVG text styling |
apps/demos/Demos/Charts/ExportCustomMarkup/React/Form.tsx |
Replaces inline React style objects with className attributes |
apps/demos/Demos/Charts/ExportCustomMarkup/React/styles.css |
Adds CSS class definitions for SVG text styling |
apps/demos/Demos/Charts/ExportCustomMarkup/ReactJs/Form.js |
Replaces inline React style objects with className attributes |
apps/demos/Demos/Charts/ExportCustomMarkup/ReactJs/styles.css |
Adds CSS class definitions for SVG text styling |
apps/demos/Demos/Charts/ExportCustomMarkup/Vue/Form.vue |
Replaces Vue :style bindings with classes and adds <style> block |
apps/demos/Demos/Charts/ExportCustomMarkup/Angular/app/app.component.html |
Replaces inline styles with CSS classes |
apps/demos/Demos/Charts/ExportCustomMarkup/Angular/app/app.component.css |
Adds ::ng-deep CSS class definitions for SVG text styling |
apps/demos/Demos/Charts/ExportCustomMarkup/Angular/app/app.component.html
Outdated
Show resolved
Hide resolved
| font-weight: bold; | ||
| } | ||
|
|
||
| .custom_markup_text--subtitle { |
Contributor
There was a problem hiding this comment.
let's use out default notation for class names using dash between words
| text-align: center; | ||
| } | ||
|
|
||
| ::ng-deep .custom_markup_text { |
Contributor
There was a problem hiding this comment.
We need improve .net demos as well
apps/demos/Demos/Charts/ExportCustomMarkup/Angular/app/app.component.css
Outdated
Show resolved
Hide resolved
EugeniyKiyashko
approved these changes
Mar 11, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.