cleanup attributes passed to the javascript plugin