File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ Fetch this in JavaScript:
3838 const user = JSON .parse (userRating .dataset .user );
3939
4040 There is no size limit for the value of the ``data-* `` attributes, so you can
41- store any content. In Twig, use the ``html_attr `` escaping strategy to avoid messing
41+ store any content. In Twig, use the ``html `` escaping strategy to avoid messing
4242with HTML attributes. For example, if your ``User `` object has some ``getProfileData() ``
4343method that returns an array, you could do the following:
4444
4545.. code-block :: html+twig
4646
47- <div data-user-profile="{{ app.user ? app.user.profileData|json_encode|e('html_attr ') }}">
47+ <div data-user-profile="{{ app.user ? app.user.profileData|json_encode|e('html ') }}">
4848 <!-- ... -->
4949 </div>
5050
You can’t perform that action at this time.
0 commit comments