fix url issues from swagger ui

Fix generating bad ids and window.location.origin issue on ie10

@Szumo @jacekjursza