[Django]-Escaping string parameters in Django templates for a JavaScript function

5👍

If I’m right in assuming that’s a JavaScript function call you’re trying to interpolate Django templating into, try the escapejs filter instead of safe.

https://docs.djangoproject.com/en/dev/ref/templates/builtins/#escapejs

👤AKX

Leave a comment