ThreeSixtyGiving / Insights

Combining and visualising 360Giving and charity data to answer questions about grantmaking
https://insights.threesixtygiving.org/
GNU General Public License v3.0
3 stars 2 forks source link

js: home: Decode url portion of url get parameter #177

Closed michaelwood closed 2 years ago

michaelwood commented 2 years ago

When receiving the url get parameter decode the url before internally submitting the "fetch from url" form. This allows us to send the url correctly url encoded whilst still maintaining backward compatibility with old urls.

e.g. https://insights.threesixtygiving.org/?url=https://grantnav.threesixtygiving.org/search.json?query=%2A&default_field=%2A&sort=_score+desc&amountAwarded=10000000 vs https://insights.threesixtygiving.org/?url=https://grantnav.threesixtygiving.org/search.json%3Fquery%3D%2522test%2Bvalley%2522%26default_field%3D%252A%26sort%3D_score%2Bdesc

michaelwood commented 2 years ago

@Bjwebb Merged & now deployed