Skip to content
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

Sanitize html passed to safe in Jinja templates #29

Merged
merged 2 commits into from
Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions nbdefense/templates/issue-codes/pii-found.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ <h3 class="font-bold">{{ issue_code | replace("_", " ") | title | replace("Pii",
<p class="mt-4"><b>Description</b>:</p>
<p>{{ issue.details.description }} with the following tag(s):</p>
<p>
<pre>{{ issue.details.summary_field | to_pretty_json | safe }}</pre>
<pre>{{ issue.details.summary_field | to_pretty_json | scrub_html | safe }}</pre>
</p>
<p class="mt-4">
<b>Location</b>: cell {{ issue.location.value }}
</p>
<div class="flex flex-row w-100 mt-4">
<div class="pr-4">
<p class="font-bold">Cell #{{ issue.cell.cell_index }}</p>
</div>
<div
class="bg-white border-solid border border-none-border rounded-md overflow-x-auto w-[42rem]"
>
<span class="pl-4">{{ issue.cell | string() | safe }}</span>
</div>
</div>
<div class="bg-white border-solid border border-none-border rounded-md overflow-x-auto w-[42rem]">
<span class="pl-4">{{ issue.cell | string() | scrub_html | safe }}</span>
</div>
</div>
</div>