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
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives