- Issue created by @minirobot
-
marcoscano β
committed 5cedfa73 on 1.0.x authored by
minirobot β
Issue #3376834 by minirobot, marcoscano: Add category anchors to the...
-
marcoscano β
committed 5cedfa73 on 1.0.x authored by
minirobot β
- Status changed to Fixed
over 1 year ago 1:25pm 25 July 2023 - πͺπΈSpain marcoscano Barcelona, Spain
Looks good to me, thanks for contributing!
My nitpicky brain has a tendency to complain that there's nothing guaranteeing that at the template level the{{ category }}
variable will be CSS-safe (in theory it could be almost any string), but I believe the idea is that these would be unique, machine-names, and it's fairly safe to assume them as CSS ids, so let's go forward with this.
Thanks! π - πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
+++ b/templates/type-tray-page.html.twig @@ -42,7 +42,7 @@ <div class="type-tray-category category--{{ category }}"> ... + <h2 id="{{ category }}">{{ category_labels[category] }}</h2>
I think this is safe, and if it weren't the problem already existed before the patch (see div class).
We can probably use
|clean_class
in both for going the safer route. - πΊπΈUnited States hawkeye.twolf αα©α―αα Unalatogiyasdi, Tsalaguwetiyi (Cherokee country)
+1 for always using `|clean_class` when printing classes in a template! :D
- πΊπΈUnited States hawkeye.twolf αα©α―αα Unalatogiyasdi, Tsalaguwetiyi (Cherokee country)
Also thank you Betty for the patch and thank you Marcos for such a quick release!!!! :D
-
marcoscano β
committed 1f3e4d1f on 1.0.x
Issue #3376834 by minirobot, penyaskito, hawkeye.twolf, marcoscano: Add...
-
marcoscano β
committed 1f3e4d1f on 1.0.x
- πͺπΈSpain marcoscano Barcelona, Spain
Sounds good, thanks all!
(and apologies for pulling the trigger too fast! :D ) Automatically closed - issue fixed for 2 weeks with no activity.