glide icon indicating copy to clipboard operation
glide copied to clipboard

Arrows breaks the HTML

Open dariovillalba opened this issue 4 years ago • 3 comments

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!

dariovillalba avatar Feb 27 '21 05:02 dariovillalba

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.

chriseagle avatar Mar 24 '21 15:03 chriseagle

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="&lt;" in the place of data-glide-dir="<" and data-glide-dir="&gt;" in the place of data-glide-dir=">"

All the best

luigimannoni avatar May 06 '21 15:05 luigimannoni