mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Checking that the CI step fails
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/workflows/qc_checks.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/qc_checks.yaml
									
									
									
									
										vendored
									
									
								
							@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user