Skip to main content



      Home
Home » Archived » EGL Development Tools » URL Encoding
URL Encoding [message #1265222] Wed, 05 March 2014 15:53 Go to next message
Eclipse UserFriend
Can EDT support URL encoding?
I believe it should be something like:

urlName = serviceLib.convertToURLEncoded(urlString);

but I can't get the syntax right.

Thanks,
Gregory
Re: URL Encoding [message #1265252 is a reply to message #1265222] Wed, 05 March 2014 16:53 Go to previous messageGo to next message
Eclipse UserFriend
Hi Gregory,

I ended up writing my own function to handle this, although I think I borrowed the code from over on the egl cafe.

The attached project was built using EDT 0.8.2 and includes all sorts of goodies but the function you're interested in is eglEncodeURI.

The project includes a BrowserSample RUI handler that showcases a lot of the features of the library. There's all sorts in the project including code to handle HTML5 local storage, getting and setting cookie values, setting the favicon, getting the browser sizes, capturing the onresize event, etc.

Anyway, I hope that helps.

Richard
Re: URL Encoding [message #1265883 is a reply to message #1265252] Thu, 06 March 2014 12:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi Gregory,

I thought I'd have a deeper look at this because I got to wondering why there wasn't a standard function available to do this within EDT, and it looks like there is though I've not tested it.

urlName = HTTPLib.convertToURLEncoded(urlString);


However, I can't quite remember why I went down the route of creating my own function so you may find there are issues with the standard one.

Richard
Re: URL Encoding [message #1265932 is a reply to message #1265883] Thu, 06 March 2014 14:13 Go to previous messageGo to next message
Eclipse UserFriend
Hi Richard --
Thanks! I used the standard HTTPLib function and it worked for me. I used it to convert only those fields that I knew would cause me problems (ones that had a space in them) and then concatenated the rest of my http url string.
I just downloaded your project and will check out some of your other functions.
Thanks again. It is much appreciated.
Gregory
Re: URL Encoding [message #1266430 is a reply to message #1265932] Fri, 07 March 2014 07:53 Go to previous message
Eclipse UserFriend
Hi Gregory,
I'm glad you got it working and I'd have done the same, and used the standard HTTPLib function. I just wish I could remember why I created my own function! It may be as simple a reason as I was also having trouble finding a standard function.
Richard
Previous Topic:EDT DOJO/local Errors when using in IFRAME
Next Topic:Has anyone tried building EDT from GitHub?
Goto Forum:
  


Current Time: Wed Jun 25 02:07:18 EDT 2025

Powered by FUDForum. Page generated in 0.10426 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top