Skip to content

Commit

Permalink
Add use-trusted-types to every page
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinEtchells authored and gecBurton committed Jul 1, 2024
1 parent 1c51adb commit 2ac3307
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 5 additions & 3 deletions django_app/redbox_app/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% from "macros/iai-top-nav.html" import iaiTopNav %}
{% from "macros/use-trusted-types.html" import use_trusted_types %}

<!DOCTYPE html>
<html lang="en" class="govuk-template">
Expand Down Expand Up @@ -31,9 +32,6 @@
data-domain="redbox.ai.cabinetoffice.gov.uk" src="https://plausible.io/js/script.pageview-props.tagged-events.outbound-links.file-downloads.js"></script>
{% endif %}

<script type="module" src="{{static('js/libs/govuk-frontend.min.js')}}"></script>
<script type="module" src="{{static('js/libs/iai-design-system.js')}}"></script>

</head>

<body class="govuk-template__body">
Expand Down Expand Up @@ -115,6 +113,10 @@
</div>
</footer>

{{ use_trusted_types() }}
<script type="module" src="{{static('js/libs/govuk-frontend.min.js')}}"></script>
<script type="module" src="{{static('js/libs/iai-design-system.js')}}"></script>

</body>

</html>
2 changes: 0 additions & 2 deletions django_app/redbox_app/templates/chats.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{% from "macros/govuk-button.html" import govukButton %}
{% from "macros/chat-macros.html" import message_box %}
{% from "macros/govuk-notification-banner.html" import govukNotificationBanner %}
{% from "macros/use-trusted-types.html" import use_trusted_types %}


{% block content %}
Expand Down Expand Up @@ -153,7 +152,6 @@ <h2 class="govuk-visually-hidden">Current chat</h2>
</div>


{{ use_trusted_types() }}
<script src="{{ static('js/libs/showdown.min.js') }}"></script>
{% if COMPRESSION_ENABLED %}
{% compress js %}
Expand Down
2 changes: 0 additions & 2 deletions django_app/redbox_app/templates/citations.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{% extends "base.html" %}
{% from "macros/govuk-button.html" import govukButton %}
{% from "macros/govuk-notification-banner.html" import govukNotificationBanner %}
{% from "macros/use-trusted-types.html" import use_trusted_types %}


{% block content %}
Expand All @@ -20,7 +19,6 @@ <h1 class="govuk-heading-l govuk-!-margin-bottom-0">Citations</h1>

</div>

{{ use_trusted_types() }}
<script src="{{ static('js/libs/showdown.min.js') }}"></script>
{% if COMPRESSION_ENABLED %}
{% compress js %}
Expand Down

0 comments on commit 2ac3307

Please sign in to comment.