diff --git a/frontend/server-data.rst b/frontend/server-data.rst index 55892ad09fc..6bb1a2b417c 100644 --- a/frontend/server-data.rst +++ b/frontend/server-data.rst @@ -38,13 +38,13 @@ Fetch this in JavaScript: const user = JSON.parse(userRating.dataset.user); There is no size limit for the value of the ``data-*`` attributes, so you can -store any content. In Twig, use the ``html_attr`` escaping strategy to avoid messing +store any content. In Twig, use the ``html`` escaping strategy to avoid messing with HTML attributes. For example, if your ``User`` object has some ``getProfileData()`` method that returns an array, you could do the following: .. code-block:: html+twig -