hooks - update unnecessary format_html to mark_safe

pull/7895/head
LB Johnston 2022-01-23 20:16:55 +10:00 zatwierdzone przez Matt Westcott
rodzic 0461e8bb8a
commit 5258f2899b
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -536,13 +536,13 @@ Hooks for customising the editing interface for pages and snippets.
.. code-block:: python
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from wagtail.core import hooks
@hooks.register('insert_global_admin_js')
def global_admin_js():
return format_html(
return mark_safe(
'<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r74/three.js"></script>',
)