Skip to content

Commit

Permalink
Handle umlautes in bundles #1803
Browse files Browse the repository at this point in the history
  • Loading branch information
adelmemariani committed Sep 13, 2024
1 parent 3a558e2 commit 71c9e54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion factsheet/templates/factsheet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
{% endblock main-content-body %}

{% block after-body-bottom-js %}
<script src="{% static 'factsheet/js/main.f125d6a0.js' %}"></script>
<script src="{% static 'factsheet/js/main.045af419.js' %}"></script>
{% endblock after-body-bottom-js %}
4 changes: 2 additions & 2 deletions factsheet/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ def serialize_publication_date(triple_object_pub_year: str):

def remove_non_printable(text):
if text is not None:
printable = set(string.printable)
return ''.join(filter(lambda x: x in printable, text))
allowed_chars = re.compile(r'[a-zA-Z0-9äöüÄÖÜß.,;:!?\'"()\-\s]')
return ''.join(char if allowed_chars.match(char) else '' for char in text)
return None

0 comments on commit 71c9e54

Please sign in to comment.