diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 604e7d0369..870315488b 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -58,6 +58,8 @@ jobs: - name: Lint Javascript Files run: | python InvenTree/manage.py prerender + echo "Checking translated javascript files:" + ls InvenTree/InvenTree/static_i18n/i18n/ npx eslint InvenTree/InvenTree/static_i18n/i18n/*.js html: diff --git a/InvenTree/part/templatetags/i18n.py b/InvenTree/part/templatetags/i18n.py index fcd9df4628..8394721372 100644 --- a/InvenTree/part/templatetags/i18n.py +++ b/InvenTree/part/templatetags/i18n.py @@ -8,8 +8,6 @@ from django import template from django.template import TemplateSyntaxError from django.templatetags.i18n import TranslateNode -import bleach - register = template.Library() @@ -21,21 +19,6 @@ class CustomTranslateNode(TranslateNode): result = super().render(context) - result = bleach.clean(result) - - # Remove any escape sequences - for seq in ['\a', '\b', '\f', '\n', '\r', '\t', '\v']: - result = result.replace(seq, '') - - # Remove other disallowed characters - for c in ['\\', '`', ';', '|', '&']: - result = result.replace(c, '') - - # Escape any quotes contained in the string - result = result.replace("'", r"\'") - result = result.replace('"', r'\"') - - # Return the 'clean' resulting string return result