From b82557dc3a381166701cd4836df8ae725ca44e2b Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Wed, 19 Nov 2025 11:13:59 +0000 Subject: [PATCH] [Frontend] Correct escape type for HTML attribute example --- frontend/server-data.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -
+