Skip to content

Add SRI (Subresource Integrity) hash to CDN script tags #5165

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

Merged
merged 12 commits into from
Jun 11, 2025
Merged
Prev Previous commit
Next Next commit
Fix CI test in test_renderers.py to include integrity and crossorigin…
… attributes

Update test template to match actual output which now includes SRI integrity
attribute and crossorigin attribute for CDN script tags.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
  • Loading branch information
ddworken and claude committed May 2, 2025
commit e4aadf2648dfd50860a94a37c17d097fbe4cdf7c
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ doc/check-or-enforce-order.py

tests/percy/*.html
tests/percy/pandas2/*.html

**/.claude/settings.local.json
2 changes: 1 addition & 1 deletion tests/test_io/test_renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def test_repr_html(renderer):
"window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n "
'<script charset="utf-8" src="'
+ plotly_cdn_url()
+ '"></script> '
+ '" integrity="sha256-oy6Be7Eh6eiQFs5M7oXuPxxm9qbJXEtTpfSI93dW16Q=" crossorigin="anonymous"></script> '
'<div id="cd462b94-79ce-42a2-887f-2650a761a144" class="plotly-graph-div" '
'style="height:100%; width:100%;"></div> <script type="text/javascript">'
" window.PLOTLYENV=window.PLOTLYENV || {};"
Expand Down