ixes #82723 by sanitizing the generated filename

And merging of changes from upstream to minen's sir-geoexplorer-base-js...