Codeinwp / Nivo-Slider-jQuery

Nivo Slider - The Most Awesome jQuery Image Slider
http://docs.themeisle.com/article/485-getting-started-with-the-nivo-slider-jquery-plugin
MIT License
1.25k stars 605 forks source link

nivo slider uses quotes in inline styles #325

Open luappy13 opened 11 years ago

luappy13 commented 11 years ago

I noticed that in the core code you use inline styles like this:

url("' + someVarConcat + '") no-repeat

This breaks a lot of parsing engines and really you shouldn't do this as far as I can see...

either escape another apostrophe i.e. url(\''

or just drop the " i.e. url('

if you think about it the inline style with your current code with some one who declares their style attribute of an img it would end up looking like this:

<img style="blah:equalsblah; background: url(" << now the style is closed

By dropping the ' and " in the .js concat you work around people using " and it is still valid