diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index a0fcf11800..c7a6711ee9 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -2533,6 +2533,8 @@ get_media_prefix Similar to the :ttag:`get_static_prefix`, ``get_media_prefix`` populates a template variable with the media prefix :setting:`MEDIA_URL`, e.g.:: - + {% load static %} + + +By storing the value in a data attribute, we ensure it's escaped appropriately +if we want to use it in a JavaScript context.