-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Remove inline scripts from the rustdoc output #81133
Copy link
Copy link
Closed
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Rustdoc currently emits two inline
<script>tags into each HTML page it generates, making it hard to enforce content security policies on websites hosting documentation. The two tags in question are:Both of the tags just define variables used by the JavaScript code, and it should be possible to replace them with
data-attributes loaded bymain.jswithout other changes to the codebase: