chrisdavies / tiny-date-picker

A small, modern, dependency-free date picker
https://chrisdavies.github.io/tiny-date-picker/
415 stars 87 forks source link

CSP script-src Violations #68

Closed derekps closed 6 years ago

derekps commented 6 years ago

Hey Chris,

Absolutely love your project. It provides a great looking date picker out of the box.

However I've just encountered an issue when adding a Content Security Policy to my site. The <a href="javascript:;" is being blocked (as it should) because my policy disallows inline javascript URL execution. Any chance you could change to a non-javascript method of ignoring the <a> tag click events? Maybe an e.preventDefault() in the click handler?

Cheers,

Derek

chrisdavies commented 6 years ago

That's a really good point. I'll happily accept a pull request. Otherwise, I'll try to get to it in the next 24 hrs, if possible.

derekps commented 6 years ago

Hey Chris,

I'm glad you think this is a worthy update. I won't get a chance to look at it until the weekend so you'll likely beat me (which is probably for the best as I haven't had a chance to study the codebase yet).

Cheers,

Derek

chrisdavies commented 6 years ago

Should be good to go. Have a look at the latest (3.1.9).

derekps commented 6 years ago

Works a treat! Thanks Chris