glide
glide copied to clipboard
Arrows breaks the HTML
Hello! I am trying to use Glide on a WordPress site, the slides work fine until I add the arrows. The html code of the arrows completely breaks the html structure of the page.
Can you help me to find de bug?
Thanks!
Hi Dario, I had this issue when plugging glide into a ACF parsed React Gutenberg block. I believe the '<' and '>' used for the data attribute direction on the arrows causes parsers to misinterpret as end of tag. I ended up removing the arrows, then adding them back in before initialising Glide on the front-end.
Moving to language rather than less than and greater than symbols would make a lot of sense.
Hello, I had the same exact issue with ACF too. The easiest workaround (and probably the right html way) is to print an escaped character.
Use data-glide-dir="<"
in the place of data-glide-dir="<"
and data-glide-dir=">"
in the place of data-glide-dir=">"
All the best