Smartsheet Bridge special characters not encoding in endpoint URL

Has anyone ran into this issue?
I would like to parse an ISO formatted time into the endpoint URL, but it's not encoding "+" to %2B.
My particular use case is getting the latest CVEs from Vulnerability APIs (nist.gov)
The endpoint should be formatted as such:
https://services.nvd.nist.gov/rest/json/cves/2.0/?lastModStartDate=2021-08-04T13:00:00.000%2B01:00&lastModEndDate=2021-10-22T13:36:00.000%2B01:0
When getting the current date in Smartsheet bridge, it doesn't automatically encode the + sign to %2B in the {{data reference}} of the endpoint.
Any Suggestions?
Sincerely,
Jacob Stey
Best Answer
-
Hey all,
If you run into this post — you can fix the issue with a single line of javascript.
return inputString.replace(/+/g, "%2B")
where the parameters are inputString with the appropriate value:
Sincerely,
Jacob Stey
Answers
-
Hey all,
If you run into this post — you can fix the issue with a single line of javascript.
return inputString.replace(/+/g, "%2B")
where the parameters are inputString with the appropriate value:
Sincerely,
Jacob Stey
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.5K Get Help
- 434 Global Discussions
- 152 Industry Talk
- 494 Announcements
- 5.3K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 77 Community Job Board
- 506 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 307 Events
- 37 Webinars
- 7.3K Forum Archives