encode quotes and other illegal characters when logging link clicks
with data attributes
use the HTML5 "download" attribute to give the original filename to
downloaded files (fixes #92)