timwis / vizwit

An interactive data visualization tool
http://vizwit.io
GNU General Public License v2.0
100 stars 35 forks source link

Filtering doesn't work with values containing + (plus) #216

Open timwis opened 6 years ago

timwis commented 6 years ago

When a value contains a plus, ie. Foo + Bar or 60+ and you click that bar, the filtering of the other charts doesn't work because the URL passed to carto encodes everything except the plus, ie. age_range%20=%20%2760+%27. Carto then interprets the + as a space.

https://phl.carto.com/api/v2/sql?q=SELECT%20*%20FROM%20pdp_state_releases_age_range%20WHERE%20(age_range%20=%20%2760+%27)%20ORDER%20BY%20date_of_release%20desc%20%20LIMIT%2010

I think the issue is with how jQuery's .ajax() function encodes the URI of the querystring. I think it's limited to + but this may affect other URL-reserved characters as well.