fixes #3961 HMTL Page preview redirects to front end page on IE9

Fixed the issue and pushed the code for review, please check it.