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
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives