Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
URL consists space works on PC browser but not in SDK
Hi guys, I'm sorry for asking too many questions today itself, However I'd like to thank for helping me.
I'm using the URL
http://sme.allomani.com/apps/api.php?action=blog_write&domain_id=1&content=ANY CONTENT&session_id=988259e873667dc7af91f24254b8e354
When I try to pass this Using the UIWebview it doesn't load anything. But when I pass the same URL without any space between
"ANYCONTENT" it executes flawlessly.
So, I thought the same that the spaces are not allowed but when I tested on many other browsers of PC's, it works great. Then where I'm going wrong in UIWebview? Please help me.
0 •
Replies
Take a look at this link.
http://www.iphonedevsdk.com/forum/iphone-sdk-development/106300-categories-nsstring-partially-working-p1.html
The method encodedURLParameterString is what you need.
Duncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeHowever would that be a problem lateron? or it is fine and I have to use the link you have provided to me?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeIf you generate a URL from user input, or add any parameters to the URL that might contain spaces or other illegal characters then you will need to write code to percent escape the parameter(s) before adding them to the URL string. Note that you should not escape the whole URL string, since characters like "&" and "/" are needed as part of the URL itself. You only want to escape PARAMETERS that might contain those characters.
For example, if your url is and "parameter" is replaced by user input, you should escape that parameter and then put it in your URL string. If you tried to escape the whole URL, you'd get
(where the %xx sequences would be replaced with the value of the "/", "=", and "&" characters, which I don't feel like looking up.)
That would cause the URL to not work.
If the string "parameter" is supposed to be replaced with "My friends & I"
Then the URL would look like this:
The "&" character that is part of the syntax of the URL should not be escaped, but the "&" that is part of "My friends & I" should be escaped.
Duncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomemySite.com/parameter=value&My%20friends%20%26%20I
The "&" character that is part of the syntax of the URL should not be escaped, but the "&" that is part of "My friends & I" should be escaped.
I just replaced the spaces in the URL and it is now working good, and once again really nice explained.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome