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
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 138 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives