https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28196
--- Comment #5 from Lucas Gass <[email protected]> --- (In reply to Phil Ringnalda from comment #4) > Since we don't support Internet Explorer, why not use the URL object, and > let it do the work of parsing for you? > > Something like (untested, so I'll probably typo something) > > let parsedurl = new URL($(this).attr('href')); > parsedurl.searchParams.set('searchid',me.searchid); > window.location = parsedurl.href; > > Bonus advantage: if searchParams.set() sees that someone has screwed up and > the URL already has two searchid params in it, it'll set one and delete the > other, while doing it by hand would be adding a third. Thanks Phil, As far as I understand it new URL() with a single argument must include an absolute path. You can give it a relative URL, but in that case you must always pass the base URL as the 2nd argument. If I'm wrong I am happy for someone to let me know of provide an alternate patch! -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
