Is there a built-in function for url encoding a string anywhere in Servoy? Thought I may have found it bundled up with the HTTP plugin, but does not seem to be there.
Please advise
Is there a built-in function for url encoding a string anywhere in Servoy? Thought I may have found it bundled up with the HTTP plugin, but does not seem to be there.
Please advise
Hi Jeff,
You can use the javascript escape() function for this.
application.output(escape("http://www.domain.com/path/to/filename with a space.html?param1=value 1"));
==> http%3A//www.domain.com/path/to/filename%20with%20a%20space.html%3Fparam1%3Dvalue%201
To reverse use unescape().
Hope this helps.
Excellent. Thanks a lot.