[Answered ]-Adding external javascript snippet to a Wagtail page field

1👍

This is a result of the Django template language’s auto-escaping behaviour, and can be overridden by adding a |safe filter:

{{ page.extra_scripts|safe }}

Of course, you should only do this if your editorial users are fully trusted, since it will give them the ability to run arbitrary code (including, for example, hijacking the session cookie of a superuser who happens to visit that page).

👤gasman

Leave a comment