Fix issue with IE8 and single quotes

IE8 doesn't support &apos;, so don't use it when building encoded forms - use &#39; instead, which all browsers support.
Merge pull request #59 from jorupp/master

Fix issue with IE8 and single quotes