mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	Escape strings
This commit is contained in:
		@@ -161,8 +161,8 @@
 | 
				
			|||||||
            {% if button.display %}
 | 
					            {% if button.display %}
 | 
				
			||||||
                $("#highlighted_button{{ button.id }}").click(function() {
 | 
					                $("#highlighted_button{{ button.id }}").click(function() {
 | 
				
			||||||
                    addConso({{ button.destination_id }}, {{ button.amount }},
 | 
					                    addConso({{ button.destination_id }}, {{ button.amount }},
 | 
				
			||||||
                        {{ polymorphic_ctype }}, {{ button.category_id }}, "{{ button.category.name }}",
 | 
					                        {{ polymorphic_ctype }}, {{ button.category_id }}, "{{ button.category.name|escapejs }}",
 | 
				
			||||||
                        {{ button.id }}, "{{ button.name }}");
 | 
					                        {{ button.id }}, "{{ button.name|escapejs }}");
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
        {% endfor %}
 | 
					        {% endfor %}
 | 
				
			||||||
@@ -172,8 +172,8 @@
 | 
				
			|||||||
            {% if button.display %}
 | 
					            {% if button.display %}
 | 
				
			||||||
                $("#button{{ button.id }}").click(function() {
 | 
					                $("#button{{ button.id }}").click(function() {
 | 
				
			||||||
                    addConso({{ button.destination_id }}, {{ button.amount }},
 | 
					                    addConso({{ button.destination_id }}, {{ button.amount }},
 | 
				
			||||||
                        {{ polymorphic_ctype }}, {{ button.category_id }}, "{{ button.category.name }}",
 | 
					                        {{ polymorphic_ctype }}, {{ button.category_id }}, "{{ button.category.name|escapejs }}",
 | 
				
			||||||
                        {{ button.id }}, "{{ button.name }}");
 | 
					                        {{ button.id }}, "{{ button.name|escapejs }}");
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
            {% endfor %}
 | 
					            {% endfor %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -160,7 +160,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 | 
				
			|||||||
        TRANSFER_POLYMORPHIC_CTYPE = {{ polymorphic_ctype }};
 | 
					        TRANSFER_POLYMORPHIC_CTYPE = {{ polymorphic_ctype }};
 | 
				
			||||||
        SPECIAL_TRANSFER_POLYMORPHIC_CTYPE = {{ special_polymorphic_ctype }};
 | 
					        SPECIAL_TRANSFER_POLYMORPHIC_CTYPE = {{ special_polymorphic_ctype }};
 | 
				
			||||||
        user_id = {{ user.note.pk }};
 | 
					        user_id = {{ user.note.pk }};
 | 
				
			||||||
        username = "{{ user.username }}";
 | 
					        username = "{{ user.username|escapejs }}";
 | 
				
			||||||
    </script>
 | 
					    </script>
 | 
				
			||||||
    <script src="/static/js/transfer.js"></script>
 | 
					    <script src="/static/js/transfer.js"></script>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user