Skip to content

Commit

Permalink
Fix HTML leak in job_detail
Browse files Browse the repository at this point in the history
Use `striptags` to strip all html from `og:description`, which was causing HTML to leak.

Resolves #2307
  • Loading branch information
dorian-adams committed Jan 22, 2025
1 parent 4e2bd04 commit 6496599
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/jobs/job_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% block content_attributes %}with-right-sidebar{% endblock %}

{% block og_title %}Job: {{ object.job_title }} at {{ object.company_name }}{% endblock %}
{% block og-descript %}{{ object.description|escape|truncatechars:200 }}{% endblock %}
{% block og-descript %}{{ object.description|striptags|truncatechars:200 }}{% endblock %}

{% block content %}
{% load companies %}
Expand Down

0 comments on commit 6496599

Please sign in to comment.