title: Remove slash if URL starts with #
body: <p>I am using smoothscroll on a wordpress website which works in some browsers but not others, simply because Wordpress keeps putting a trailing slash in the middle of the URL.</p>
  
  <p>If I click an internal link (eg. #gallery) to scroll to siteurl.com#gallery it actually goes to siteurl.com/#gallery and this does not work in some browsers.</p>
  
  <p>However I do not want to add a function that removes the trailing slash altogether as then other pages will not be linked to (eg. siteurl.com/news).</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks</p>