mode / alamode

A community-maintained library of visualizations for Mode reports
MIT License
70 stars 67 forks source link

Add support for URI encoding of table values to preserve special characters #36

Closed nickwang14 closed 3 years ago

nickwang14 commented 5 years ago

We ran into an issue where we were using

alamode.addLinksToTables({ table_id: "table_0e7c4f909917", query_name: "Alignment", link_columns: ["Account"], link_urls: ["https://modeanalytics.com/xxx/xxx/xxx?run=now&param_customer[]={{Account}}"] })

And account values like Hello #123, and A&B were getting truncated on special characters. I have no way of testing, so I'm hoping someone can look at this soon and merge if it works! It's a 1 line code change :)

leqilong commented 4 years ago

Hi @nickwang14, apologies for the long wait. While your solution does help encode the query string values that have special characters like hash, or a space, this won't work for the scenario when the table data cell is an entire URL, like homepage_link here for example.