mcneilco / acas

http://mcneilco.com/acas.html
GNU General Public License v3.0
12 stars 5 forks source link

ACAS-761: Fix download urls for experiment files containing # special character #1146

Closed bffrost closed 8 months ago

bffrost commented 8 months ago

Description

I dug into this a little more and found that there are some subtle differences between encodeURI which is meant to encode an entire URL / URI and encodeURIComponent which is meant to encode a query string or path component in a URL. For more info: https://stackoverflow.com/questions/75980/when-are-you-supposed-to-use-escape-instead-of-encodeuri-encodeuricomponent

I found that a simple switch to encoding only the fileValue with encodeURIComponent fixes the issue with # characters.

Related Issue

https://schrodinger.atlassian.net/browse/ACAS-761

How Has This Been Tested?