URL in background images broken when splitting inline styles
gildersleeve opened this issue · comments
scrollreveal/dist/scrollreveal.js
Line 764 in eb24048
If an inline style includes an absolute path to an image it will be split incorrectly here. The split assumes there is only 1 :
but background images can introduce multiple :
.
Example: <div style="background-image:url('https://www.example.com/test.jpg')"></div>
. It would be incorrect to split on :
.
Since the next line looks for the value as ref[1], what gets rendered here after running through scroll magic is <div style="background-image:url('https')"></div>
Thanks for catching this @gildersleeve!!