olivernn / davis.js

RESTful degradable JavaScript routing using pushState
http://davisjs.com
532 stars 58 forks source link

originChecks of Davis.listener don't work correctly in IE8 #25

Closed jacobcoens closed 12 years ago

jacobcoens commented 12 years ago

As the originCheck checks against the host property of the hyperlink, (in some cases) the port number is included whereas it is not included in the host property of window.location.

I've fixed this by using the hostname property of the hyperlink in stead of the host property.

Also, I think the protocols should match so that linking to and from the https-secured site will result in a page refresh.

This would result in the following for line 220 of davis.js return elem.hostname !== window.location.host || elem.protocol !== window.location.protocol

olivernn commented 12 years ago

Hey that sounds good, could you put this together into a pull request? Then I can add this into the next release.

olivernn commented 12 years ago

fixed in the latest release