- Issue created by @thtas
Similar to 🐛 Render using theme input and select instead of lists with links for checkboxes and dropdown Needs review , many of our projects use the links facets and like many we struggle to keep the wave of naughty bots and crawlers at bay.
Attached is a patch for the 2.x branch of this module which remove the contents of the facet link href attribute and instead stores the href in a data attribute of the link.
The facet JS clicks the link as before, but uses the data attribute instead of the href directly.
We have had some success with this approach, so posting here for others.
Note:
- This does probably wreck accessibly for the links.
- The patch removes a version: VERSION
line from the facet library yml file. This is so JS is properly re-aggregated (if you have aggregation enabled.
Needs review
2.0
Code