malsup / cycle2

2nd gen cycling
899 stars 236 forks source link

Custom Pager Template does not close parsed string #861

Open StudioAl opened 3 years ago

StudioAl commented 3 years ago

When defining a custom pager template, the template string is not closed out correctly. It appears to ignore the closing quote and continue to parse the code after the attribute as part of the string. This occurs even when testing with the exact template strings used in the demos, and it occurs whether data-cycle-pager-template is used in the slideshow container or on a per-slide basis.

Example (with data-cycle-slide="> .slide":

<div class="slide" data-cycle-pager-template="<a href=#>Spring</a>">
      <div class="inner">Slide Content</div>
</div>

… results in this in the console log:

[cycle2] [0] pagerTemplate: <a href=#>Spring</a>“>
      <div class= (string)